javascript要点介绍
<script type="text/javascript">
<!--
function changeNum(obj,revertID)
{
var tar=obj.parentNode.nextSibling;
while(tar.tagName!='DIV')
{
tar=tar.nextSibling;
}
tar=tar.childNodes[tar.childNodes.length-3];
tar.innerHTML=NewGameBBS.DiscussBBS.Default.showNum(revertID).value;
}
//-->
</script>
<div>
<div class="right t_number">
<a href='RevertDiscuss.aspx?aid=<%= aid %>&cpage=<% = cpage %>&rid=<%# Eval("revertID") %>&floor=<%# Eval("floor") %>'>
引用</a> <span style="color: #154BA0; cursor: pointer;" onclick="changeNum(this,<%# Eval("revertID") %>);">支持</span> <span style="color: #154BA0; cursor: pointer;" onclick="changeOpposeNum(this,<%# Eval("revertID") %>);">反对</span></div>
<div style="padding-top: 6px;">
<span class="bold"><a id='r<%# DataBinder.Eval(Container.DataItem,"revertID") %>'>第<%# Eval("floor") %>楼</a></span> 发表于<%# Eval("revertDate") %> 鲜花:<span><%# Eval("VoteNum") %></span> 鸡蛋:<span><%# Eval("OpposeNum")%></span></div>
</div>
[AjaxMethod]
public string showNum(int revertID)
{
NewGameBBSLib.Operation operation = new NewGameBBSLib.Operation();
return operation.AddRevertVoteNum(revertID);
}
本文地址:http://www.45fan.com/a/question/70547.html