<script language="javascript" type="text/javascript">
var request = false;
try {
request = new XMLHttpRequest();
} catch (trymicrosoft) {
try {
request = new ActiveXObject("Msxml2.XMLHTTP");
} catch (othermicrosoft) {
try {
request = new ActiveXObject("Microsoft.XMLHTTP");
} catch (failed) {
request = false;
}
}
}
//发送hello的方法
function SendHello() {
var param = document.getElementById("helloID").value;
var url = "http://192.168.2.110:5280/web/jwchat/jwchat.html";
request.open("post", url, true);
requst.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
request.onreadystatechange = updatePage;
request.send(param);
}
function updatePage() {
if (request.readyState == 4)
if (request.status == 200)
alert("Server is done!");
else if (request.status == 404)
alert("Request URL does not exist");
else
alert("Error: status code is " + request.status);
}
</script>
菜鸟一只,SCRIPT5:拒绝访问 |