function get_value(form){
var scid=sub_class.value;//运算类型号
//---------------------------------------
//使用ajax发送选中的运算类
var url = "query_subject.php?scid="+scid;
xmlhttp.onreadystatechange = Content;
// var url = "query_subject.php?";
xmlhttp.open("GET",url,true);
xmlhttp.send(null);
//---------------------------------------
function Content(){
if(xmlhttp.readyState==4){
if(xmlhttp.status==200){
var sel=document.getElementById("sub_name");
var rst=JSON.parse(xmlhttp.responseText);//将字符串转化为数组
for(var i=0; ilse{
alert("你请求的页面错误");
}
}
}
}
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/30093551/viewspace-1472668/ ,如需转载,请注明出处,否则将追究法律责任。