function AddComment(content) {
VAR t
hreadId = $("
#span_thread_id").
html();
var groupId = $("#span_group_id").ht
ML();
var groupTy
PE = $("#span_group_type").html();
var t
ITle = $("#thread_title").html();
var content = content.replace(/\x22/g,'"');
$.ajax({
url: '/WebService/GroupService.asmx/AddThreadComment',
data: '{threadId:' + threadId + ',groupId:' + groupId + ',groupType:' + groupType + ',title:"' + title + '",content:"' + content + '"}', type: 'post',
dataType: 'json',
contentType: 'application/json;charset=utf-8',
cache: false,
success: function(data) {
//根据返回值data.d判断是不是成功
},
error: function(xhr) {
//中间发生异常,查看xhr.responseText
}
});
}
jQuery的JSON插件:http://code.