02 2019 档案
摘要:构造器 var xhr = new XMLHttpRequest() 设置超时时间 xhr.ontimeout=1000 设置超时时间为 1s 设置超时时间(单位:ms) 0为永不超时 HTTP 请求的状态 xhr.readystate 从请求开始到完全结束,有5个状态分别对应不同的阶段,具体如下表
阅读全文
摘要:encodeURI、decodeURI encodeURI、decodeURI 对字符转义;不替换特殊字符有18个、(大小写)字母、数字。 替换目标 将字符替换为 HTML URL编码 替换范围 A-Z a-z 0-9 - _ . ! ~ * ' ( ) / ? : @ & = + $ # 不替换,
阅读全文