【发布时间】:2020-03-26 04:52:29
【问题描述】:
我的脚本是这样的:
function showBrand(str) {
if (str=="") {
document.getElementById("txtHint").innerHTML="";
return;
}
if (window.XMLHttpRequest) {
// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
} else { // code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange=function() {
if (this.readyState==4 && this.status==200) {
document.getElementById("txtHint").innerHTML=this.responseText;
}
}
xmlhttp.open("GET","index?modul=sgob&q="+str,true);
// xmlhttp.open("GET","window.location.href + "?q="+str,true);
xmlhttp.send();
}
但文件 javascript 未引用文件 modul=sgob.. 所以我无法运行复选框全选。
【问题讨论】:
标签: javascript php html ajax