str+='<div class="box1 clearfix">'+
'<img class="head"'+
'src="/Gmshop'+obj.headPhoto+'" alt="" />'+
'<div class="contents_head">'+
'<div class="main_h">'+
'<p class="txt">'+
'<span class="user">'+obj.nick+':</span>'+obj.content+
'</p>'+pic+
'</div>'+
'<div class="info clearfix">'+
'<span class="time">'+obj.createTime+'</span> <a onclick="pointPostForF('+obj.postId+',this);" class="praise"'+
'href="javascript:;">'+zan+'</a>'+
'</div>'+
'<div class="praises-total" total="0" style="display: block;"><span id="'+obj.postId+'">'+obj.points+'</span>个人觉得很赞</div>'+
'<div class="comment-list"><a href="hot_detail.html?id='+obj.postId+'" style="color:#369;">查看详细</a>'+deletebtn+
'</div>'+
'</div>'+
'</div>';
function pointPostForF(a,b){
alert("点赞Id");
alert(a+"-----"+b)
//window.location.href='pointPostForF.action';
$.post("pointPostForF.action",
{
postId:a,
flag:b
},
function(data){
alert(data);
});
}
只是一个普通的拼接显示在页面上,“点赞”后,然后走个pointPostForF(),我就搞不明白了,怎么就是进不去呢,alert总能出来吧,也不行
慕spring