ActiveXObject问题,本人在线
各位大虾,下列代码怎么不起作用,我原想在COMMON.ASP里每60s向onceonline.asp发送更新请求,可是总不执行,我在ie中直接输入http://localhost/onceonline.asp确定了onceonline.asp代码是正确的,
common.asp
<script language=javascript>
function Test()
{
var xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
xmlhttp.open("post","onceonline.asp",true); // 向onceonline.asp发送更新请求
xmlhttp.setRequestHeader("CONTENT-TYPE","application/x-www-form-urlencoded");
xmlhttp.send();
}
setInterval("Test();",6000); // 60秒钟发送一次更新请求
</script>