add file:跨域通信

This commit is contained in:
qianguyihao
2018-03-07 17:08:42 +08:00
parent 19ab6cdea0
commit 8e4b71cab5
4 changed files with 523 additions and 42 deletions

View File

@@ -54,11 +54,11 @@ AjaxAsynchronous Javascript And XML异步 JavaScript 和 XML。它并
1创建异步对象。即 XMLHttpRequest 对象。
2设置请求的参数。包括请求的方法、请求的url。
2使用open方法设置请求的参数。open(method, url, async)。参数解释请求的方法、请求的url、是否异步
3发送请求。
4注册事件。 onreadystatechange事件状态改变时就会调用。
4注册事件。 注册onreadystatechange事件状态改变时就会调用。
如果要在数据完整请求回来的时候才调用,我们需要手动写一些判断的逻辑。