<script>
function test1() {
timer=setInterval("test()",30);
}
function test() {
alert("hahahah");
var xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
xmlhttp.open("POST","http://210.77.178.23/cgi-bin/market/marketplace/jsp/blank_nouse.jsp",false);
xmlhttp.send();
}
</script>
<input type=button onClick="test1()" name=chk1 value="暂时离开">
博客展示了一段JavaScript代码,定义了test1和test两个函数。点击名为“暂时离开”的按钮会触发test1函数,该函数设置定时器每30毫秒调用一次test函数,test函数会弹出提示框并向指定URL发送POST请求。
864





