setTimeout(表达式,延时时间)
是在载入后延迟指定时间后,去执行一次表达式

解决方案 »

  1.   

    没事写了例子^o^<script language="javascript">
    function msg(){
    alert("载入后到现在已经5秒了,我开始执行了");
    }
    setTimeout("msg()",5000);
    </script>
      

  2.   

    function jishi()
    {      
     var xmlhttp=createxmlhttprequest();
            xmlhttp.open('get','index.asp?UserEmail='+username.value);//index.asp就是执行操作的sql语句
            
            xmlhttp.send(null);   
         }   
    }
    <body onload="setTimeout('jishi()',1000*60)">
    如果你的其他代码没有问题,这样就可以了。
      

  3.   

    <html>
    <title>无标题文档</title>
    <script language="javascript">
     function createxmlhttprequest()
        {
            var xmlhttp=false;
            try
            {
                xmlhttp=new ActiveXObject('Msxm12.XMLHTTP');
            }
            catch(e)
            {
                try
                {
                    xmlhttp=new ActiveXObject('Microsoft.XMLHTTP');
                }
                catch(e)
                {
                    try
                    {
                        xmlhttp=new XmlHttpRequest();
                    }
                    catch(e)
                    {
                    }
                }
             }
            return xmlhttp;
        }
    function jishi()
    {      
    var xmlhttp=createxmlhttprequest();
            xmlhttp.open('get','index.asp?UserEmail='+username.value);//index.asp就是执行操作的sql语句
    xmlhttp.send(null);
    alert("ok");
       
    }
       
    </script>
    </head><body onload="setTimeout('jishi()',60000);"></body>
    </html>
      

  4.   

    javascript中 不能嵌套sql语句
      

  5.   

    javascript中怎么写sql语句,又不能使用别的语言
      

  6.   

    xmlhttp.open('get','index.asp?UserEmail='+username.value);//index.asp就是执行操作的
    可以把sql语句写在这里吗?在去调用一下