function AgreePost(link, postId)
{
WawaSoft.WaTu.Web.AjaxHelperServices.AddPostAgreeHits(postId,
function(result,link){
link.outerHTML = "支持" + result;
},
function(error){
link.outerHTML = error.get_message();
},
link);
}
{
WawaSoft.WaTu.Web.AjaxHelperServices.AddPostAgreeHits(postId,
function(result,link){
link.outerHTML = "支持" + result;
},
function(error){
link.outerHTML = error.get_message();
},
link);
}
给大家推荐两篇文章
用函数式编程技术编写优美的 JavaScript
http://www.ibm.com/developerworks/cn/web/wa-javascript.html
用匿名函数避免命名冲突
http://home.wangjianshuo.com/cn/20070515_cec.htm