摘要:
<script> var xhr = new XMLHttpRequest(); xhr.open('GET', 'xml.php'); xhr.send(); xhr.onreadystatechange = function () { if (this.readyState !== 4) ret 阅读全文
摘要:
<script> // console.time('abc') // for (var i = 0; i < 100000000; i++) {} // console.timeEnd('abc') // console.log('begin request') var xhrAsync = new 阅读全文
摘要:
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>AJAX发送GET请求并传递参数</title></head><body><ul id="list"></ul><script> var listElement = 阅读全文
摘要:
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>AJAX发送POST请求</title> <style> #loading { display: none; position: fixed; top: 0; le 阅读全文
摘要:
<script> var xhr=new XMLHttpRequest(); xhr.open('POST','/add.http');//设置请求行 xhr.setRequestHeader('Foo','Bar');//设置请求头 //设置的请求体的格式内容(urlencoded),根据请求头 阅读全文
摘要:
< !DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>Title</title></head><body><!--XMLHttpRequest 兼容方案--><!--var xhr=window.XMLHttpReq 阅读全文