function doUpdate(){ try { var sel = getRightSel(); var modeno = document.form1.modeno.value; var url = "UpdateDo.do?sel="+sel+"&modeno="+modeno; String.prototype.trim = function(){return this.replace(/\s/g,'');}
var url1 = encodeURI(url.trim());
var xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
xmlHttp.open("POST",url1,false);
xmlHttp.send();
var result= xmlHttp.responseText;
var resulet1 = result.trim();
if (resulet1=='false'){
return false;
}else{
alert("修改成功");
}
}catch(exception) {
alert('<bean:message key="centerResume.serverShutDown"/>');
}
return false;
}
使用 encodeURI 编码,使URL采用utf-8编码提交,否则中文将被改成其它编码格式。