02.js
来自「进行ajax开发sdsd s d sd s」· JavaScript 代码 · 共 17 行
JS
17 行
/** * Use XMLHttpRequest to fetch the contents of the specified URL using * an HTTP GET request. When the response arrives, pass it (as plain * text) to the specified callback function. * * This function does not block and has no return value. */HTTP.getText = function(url, callback) { var request = HTTP.newRequest(); request.onreadystatechange = function() { if (request.readyState == 4 && request.status == 200) callback(request.responseText); } request.open("GET", url); request.send(null);};
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?