JemBai
1、javascript ,设置一个变量,只允许提交一次。


<script language="javascript">
    var checkSubmitFlg = false;
    function checkSubmit()
{
      if (checkSubmitFlg == true)
   {
         return false;
      }
      checkSubmitFlg = true;
      return true;
   }
   document.ondblclick =
   function docondblclick()
   {
    window.event.returnValue = false;
   }
   document.onclick =
   function doconclick()
   {
       if (checkSubmitFlg)
    {
         window.event.returnValue = false;
       }
   }
</script>
<html:form action="myAction.do"
method="post" onsubmit="return checkSubmit();">



2、javascript,将提交按钮或者image置为disable



<html:form action="myAction.do"
method="post"
    onsubmit="getElById(\'submitInput\')
.disabled = true;
return true;
"> 
 
  <html:image
  styleId="submitInput"
  src="images/ok_b.gif"
  border="0" />
 
  </html:form>

分类:

技术点:

相关文章:

  • 2022-12-23
  • 2022-02-12
  • 2021-07-18
  • 2021-09-07
  • 2022-12-23
  • 2022-02-11
  • 2021-08-10
  • 2021-10-17
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-09-19
  • 2021-10-10
  • 2021-12-04
  • 2022-12-23
相关资源
相似解决方案