hacks2_11.js
来自「ajax学习教程,方便大家加快学习速度,希望大家喜欢」· JavaScript 代码 · 共 30 行
JS
30 行
window.onload=function(){ var hid = document.getElementById("hid"); var val = "navprops="+encodeURIComponent(hid.value); url = "http://www.parkerriver.com/s/hid"; httpRequest("POST",url,true,handleResponse,val);}//event handler for XMLHttpRequestfunction handleResponse(){ try{ if(request.readyState == 4){ if(request.status == 200){ alert("Request went through okay..."); } else { //request.status is 503 //if the application isn't available; //500 if the application has a bug alert( "A problem occurred with communicating between"+ " the XMLHttpRequest object and the server program."); } }//end outer if } catch (err) { alert("It does not appear that the server "+ "is available for this application. Please"+ " try again very soon. \nError: "+err.message); }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?