Object.append(ajaxData,{arrAttach : xxx ... // 新的数据});
var ajaxData = {
"type" : $sendObjDeal()
},callFun = function(json){
msgArea.appendHTML(json.html,"top");
send.fireEvent("afterCheckSubmit", send);
clearMsgInput();
},ajaxUrl;
if (flag === "0"){
ajaxUrl = ...;
Object.append(ajaxData,{content : eassyCont.val()});
callFun.extend("bind",function(){bindAfterSend(msgArea.getElement(".jsForIbtn"),1)})
}else if (flag === "1") {
ajaxUrl = ContentItem.poll;
Object.append(ajaxData,{pollItemContentTexts:JSON.encode($$(".jsForPollOption").val()),
pollContentText : voteQuestion.val()
});
callFun.extend("bind",function(){bindAfterSend(msgArea.getElement(".jsForIbtn"),4)})
} else if (flag === "2") {
ajaxUrl = ContentItem.assignment;
...// 独立的操作
}
// 统一发送ajax请求
new AjaxPost(this,{
url : ajaxUrl,
data: ajaxData,
callback : function(json){
callFun(json);
callFun.bind()
}
}).send()