function login( username , password )
{
var user = new User( username , password );
//alert(user.root.xml);
document.all.buSubmit.disabled = true;
xmlhttp = new ActiveXObject("MSxml2.XMLHTTP");
xmlhttp.Open("POST","Logon.aspx",false);
xmlhttp.Send( user.root.xml );
var xml = xmlhttp.responseText;
}
使用setTimeout("yourfunction",sec*1000)
sec是调用的间隔秒数。
yourfunction是一个js函数,该函数需要在onload方法里面调用,该方法类似下面这样:
function yourfunction(){
// do something here
setTimeout("yourfunction",sec*1000);
}