Uncaught ReferenceError
function save_sj(){
var sj=UE.getEditor('editor').getContent();
xmlHttp_save_sj=GetXmlHttpObject();
if (xmlHttp_save_sj==null)
{
alert ("Browser does not support HTTP Request")
return
}
var url="php/save_sj.php";
var str="c_sj="+sj;
xmlHttp_save_sj.onreadystatechange=function() {
stateChanged_save_sj() ;
};
xmlHttp_save_sj.open("POST",url,true);
xmlhttp_save_sj.setRequestHeader("Content-type","application/x-www-form-urlencoded");(注:这是第142行)
xmlHttp_save_sj.send(str);
}
在LAMP环境下,Google Chrom下调式
my.js:142 Uncaught ReferenceError: xmlhttp_save_sj is not defined
at save_sj (my.js:142)
at HTMLButtonElement.onclick ((index):24)
“xmlhttp_save_sj ”,是不可能没有定义的啊。写错那了呢。
谢谢各位!