标签:
var request = new XMLHttpRequest() if(window.XMLHttpRequest){ request = new XMLHttpRequest() }else{ request = new ActiveXObject("Microsoft.XMLHTTP") } request.open(‘POST‘,‘create.php‘,true) request.setRequestHeader(‘Content-type‘,‘application/x-www-from-urlencoded‘) request.send(‘name=王二狗&sex=女‘) request.onreadystatechange = function(){ if(request.readyState === 4 && request.status ===200){ // do sth } }
标签:
原文地址:http://www.cnblogs.com/cynthia-wuqian/p/4953774.html