请问一个javascript简单小问题?

来源:百度知道 编辑:UC知道 时间:2024/05/07 02:31:52
请问一个javascript简单小问题?
<script language="javascript">
function test()
{
var xmlhttp=new activexobject("msxml2.xmlhttp");
xmlhttp.open("post","onceonline.asp",false);
xmlhttp.setrequestheader("content-type","application/x-www-form-urlencoded");
xmlhttp.send();
}
setinterval("test();",10);
</script>

请问一下msxml2.xmlhttp是什么组件?
xmlhttp.open("post","onceonline.asp",false)这句的post和false具体什么意思,整句什么意思?
xmlhttp.setrequestheader("content-type","application/x-www-form-urlencoded");这句的setrequestheader什么意思?整句什么意思?
xmlhttp.send();这句什么意思?
setinterval("test();",10);这句的setinterval什么意思?10是什么意思?整句什么意思?

好像在看天书一般

1.msxml2.xmlhttp 是浏览器的一种插件,用来创建不同浏览器的 xmlhttp对象
2. post 是传输方式,共有7种 其中 post和get是最常用的两种
3.false 这个参数是开关 说明 改方法不支持异步调用,你改为true 就打开了异步调用
4.xmlhttp.send(); 是将你上面的程序发送到服务器的方法
5. 这个setinterval("test();",10);是说明 每格10ms 调用一次test()这个方法