标签:window col response sof hang ready function ons get
<script> //用没有定义的变量-保存 //用没有定义的属性-undifind window.onload = function(){ var oBtn = document.getElementById(‘btn1‘); oBtn.onclick = function(){ //兼容IE6 var oAjax = window.XMLHttpRequest?new XMLHttpRequest():new ActiveXObject(‘Microsoft.XMLHTTP‘); oAjax.open(‘GET‘,‘https://cdn.bootcss.com/jquery/3.2.1/core.js‘,true); oAjax.send(); oAjax.onreadystatechange = function() { if(oAjax.readyState == 4)//通讯完成 { if(oAjax.status==200)//通讯成功 { alert(oAjax.responseText); } else { alert(‘fail‘); } } } } } </script>
标签:window col response sof hang ready function ons get
原文地址:https://www.cnblogs.com/black-/p/9319062.html