13,100
社区成员
发帖
与我相关
我的任务
分享
function onSendInfo(reqId){
if(confirm("是否确认发送站内短信?")){
var friendList = document.getElementById("friendList");
var msgContent = document.getElementById("textarea2");
if(onValidate(friendList,msgContent)){
return;
}
var usernames=onSelect(friendList);
var params="?reqId="+reqId
+"&msgContent="+encodeURI($("#textarea2").val())
+"&sendMember="+encodeURI(usernames)
+"&msgTitle="+encodeURI($("#textarea").val());
$.ajax({
type: "post",
url: "motorcade_alliance_send_message.jspx"+params,
dataType: "json",/*这句可用可不用,没有影响*/
contentType: "application/json; charset=utf-8",
success: function (data) {
if(data.status==0){
alert('发送站内短信成功!');
}else if(data.status==1){
alert(data.errors);
}
},
beforeSend: function(XMLHttpRequest){
XMLHttpRequest.setRequestHeader("RequestType", "ajax");
},
error: function (XMLHttpRequest, textStatus, errorThrown) {
alert(errorThrown);
}
});
}
}