function ftn_button_clicked(){ xhr = new createXHR(); //var url="\PointGenerate"; xhr.open("GET", "PointGenerate.java", true); xhr.send(); xhr.onreadystatechange = ajaxComplete; } function ajaxComplete(){ if(xhr.readyState === 4 && xhr.status === 200){ document.getElementById("txt1").innerHTML.value = xhr.responseText; var num = xhr.responseText; window.alert("good"); plotrandom(num); } } function createXHR(){ if(window.XMLHttpRequest){ xhr = new XMLHttpRequest(); //window.alert("111"); check working or not } else{ xhr = new ActiveXObject("Microsoft.XMLHTTP"); //window.alert("1111"); }
用游览器打开网页后,按按钮没反应, 就F12查看属性,游览器报错是这open那句话。 说is not a function.
yinyun
amorlova
相关分类