需要有关以下代码的帮助。问题是它只触发最后一个 xmlhttp.open 而不是两者。代码如下。
<script type="text/javascript">
function loadXMLDoc(obj){
var xmlhttp;
var flag;
var mycode;
mycode = obj;
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 (xmlhttp.readyState==4 && xmlhttp.status==200){
}
}
flag = document.getElementById(mycode);
if (flag.value == "Uncall") {
flag.value = "Call Patient";
document.getElementById('myDiv'+mycode).innerHtml="<b><font color='#00FF00'>Called</font></b>";
}else{
flag.value = "Uncall";
document.getElementById('myDiv'+mycode).innerHtml="<b><font color='#00FF00'>Calling..</font></b>";
**xmlhttp.open("GET","http://1.1.1.1/callnumber.cgi?"+mycode,true);
xmlhttp.send();
xmlhttp.open("GET","http://2.2.2.2/displaynumber.php?"+mycode,true);
xmlhttp.send();**
}
}
</script>
感谢一些意见