javascript中向服务器发送http请求借助的是XMLHttpRequest对象,其他一些库如JQuery对http的请求应该是在这个上面的封装,创建XMLHTPRequest对象用下面的语句:
function createXMLHttpRequest() {
var xmlHttp;
if (window.XMLHttpRequest) {
xmlHttp = new XML...
function Ajax(url, data, method) {
var xmlHttp = null;
if (window.XMLHttpRequest) {
xmlHttp = new XMLHttpRequest();
} else {
var MSXML = ['Microsoft.XMLHTTP', 'MSXML.XMLHT...
<script type="text/javascript">
var xmlhttp;
function startrefresh(){
xmlhttp=new XMLHttpRequest();
xmlhttp.open("POST,"ss.jsp",true);
xmlhttp.setRequestHeader("Content-type","applica...