Add: Catch ajax request

This commit is contained in:
surunzi
2016-05-10 22:01:44 +08:00
parent 1ec7c8b388
commit 18a6a8388c
6 changed files with 169 additions and 2 deletions

View File

@@ -27,6 +27,23 @@
<div>
<img src="http://7xn2zy.com1.z0.glb.clouddn.com/blog_elf.jpg">
</div>
<script>
function req(url)
{
var xhr = new XMLHttpRequest();
xhr.open('GET', url);
xhr.send();
}
setTimeout(function ()
{
req('http://localhost:3000/test/style.css');
}, 2000);
setTimeout(function ()
{
req('http://localhost:3000/test/style.css');
}, 2000);
</script>
</div>
</body>
</html>