﻿// JScript 文件
 

var xmlHttp;//全局XMLHttpResquest对象 
 
//针对不同浏览器，获取XMLHttpRequest对象 
function CreateXMLHttpRequest() 
{ 
	if(window.ActiveXObject)
		xmlHttp = new ActiveXObject("Microsoft.XMLHttp");
	else if(window.XMLHttpRequest)
		xmlHttp = new XMLHttpRequest();
} 

function startRequest(aid)
{
 CreateXMLHttpRequest(); 
 xmlHttp.onreadystatechange=HandleStateChange; 
 var qurl = "/Article/Outhit.aspx?ID="+aid;
 xmlHttp.open("POST", qurl, true);
 xmlHttp.send(qurl); 
}
 
 
//回调函数 
function HandleStateChange() 
{ 
 if(xmlHttp.readyState==4) 
 { 
 if(xmlHttp.status==200) 
 { 
 document.getElementById("result").innerHTML = xmlHttp.responseText; 
 } 
 } 
} 


