XMLHTTP Ajax非同步更新資料
No Comments

發布:
更新:2014-10-12 18:39:16

最近一直瘋狂寫聊天室,更新一堆有的沒的,發個小筆記。

var http = new XMLHttpRequest("Microsoft.XMLHTTP");
var url_='http://example.com/';

function connect(){
	http.onreadystatechange = function(){
		if (http.readyState==4){
			if (http.status==200){
				//Do Something.
			}else{
				//Connect Failed.
			}
		}
	}
	http.open("GET",url_,true);
	http.send();
}

This entry was posted in HTML, JS, WebHosting By Weil Jimmer.

About Weil Jimmer

Hi! Everyone! My name is Weil Jimmer. This is my personal blog. I'm a webmaster of this site. I hope the site will be popular. Now, Let's go! Enjoy gaining more knowledge.
More Details About Me : https://weils.net/profile.php


Leave a message.

Only the first 10 comment will show.