书目详细信息 : 音乐创作
请先登录!",3,null); } else{ $.ajax({ url: "/opac/book/bookComment", type: "post", timeout:3000, data:$("#pinglun").serialize(), success: function(msg){ alert(msg,3,null); getCommentInfo(); addGoldBeans(3); } }); } } }); } function addGoldBeans(type){ $.ajax({ type: "POSt", url: "/opac/beans/addBeans", dateType:"json", data:{ type:type }, cache: false }); } //字符串补零 function pad(num, n) { var len = num.toString().length; while(len < n) { num = "0" + num; len++; } return num; } //获取评论信息 function getCommentInfo(){ $.ajax({ url: "/opac/book/getCommentInfo/"+547971, type: "get", dateType:"json", timeout:3000, cache: false, async: true, data : "", success: function(msg){ var count=0; if(msg.length>0){ var list=eval("("+msg+")"); count=list.count; if(count>0){ $(".booksCritique-list").show(); $("#pinluninfo").empty(); for(var i=0;i"); li.appendTo($("#pinluninfo")); var h4=$("

"); h4.appendTo(li); var a=$(""+list.commentsList[i].USER_NAME+""); a.appendTo(h4); var data = new Date(list.commentsList[i].LAST_EDIT_TIME); var time=data.getFullYear()+"-"+pad((data.getMonth() + 1),2)+"-"+pad((data.getDate()),2)+" "+pad((data.getHours()),2)+":"+pad((data.getMinutes()),2)+":"+pad((data.getSeconds()),2); var span=$(""+time+""); span.appendTo(h4); var div=$("
"); div.appendTo(li); var p=$("

"+list.commentsList[i].CONTENT+"

"); p.appendTo(div); } } } $("#plcount").html(count); } }); $("#content").val(''); }