1. <form onsubmit="return checkFunction()">
2. history.go(-1)

解决方案 »

  1.   

    to meizz(梅花雨):关于 (1):我能让这个函数决定这个表单是可以被提交还是不能被提交吗?
      

  2.   

    <html>
    <head>
      <title>一个显示正在加载的页面写法</title>
      <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
      <meta content="F.R.Huang(meizz梅花雨)//www.meizz.com" name="author">
      <script language=javascript>
        document.write("<div id=loadingDiv><br>&nbsp; 页面正在加载,"+
                       "请等待<span id=loading></span></div>");
        var s1 = setInterval("loading.innerText+='.'", 300);
        var s2 = setInterval("loading.innerText = ''", 8000);    function window.onload()
        {
          clearInterval(s1);
          clearInterval(s2);
          loadingDiv.style.display = "none";
          bodyHidden.style.display = "";
        }
      </script>
    </head><body>
      <div id="bodyHidden" style="display: none">
        <!-- 网页的具体代码 -->
      </div>
    </body></html>
      

  3.   

    1)
    <script>
    function beforeSubmit()
    {
    //do validation here...
    return true;//继续提交
    return false;//停止提交

    </script>
    <form onsubmit="beforeSubmit()">2)
    window.history.go(-1) 
    or 
    window.history.back()3)
    <div id=oDiv></div><script>
    oDiv.innerText="wait for 3 second...";
    window.setTimeout("oDiv.innerText='Done'",3000)
    </script>
    不过一般都是做一些慢的事时,才会这样
    通常都是通过事件机制实现,当某对象开始动作前设定,在动作完成后,对象触发他的完成事件
    在该完成事件里重置显示
      

  4.   

    1. <form onsubmit="return checkFunction()">这个函数返回值(true false)将决定这个表单是否提交