var checkSubmitFlg = false;function checkSubmit(){if (checkSubmitFlg == true){return fal...">
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>
Word教程网 | Excel教程网 | Dreamweaver教程网 | Fireworks教程网 | PPT教程网 | FLASH教程网 | PS教程网 |
HTML教程网 | DIV CSS教程网 | FLASH AS教程网 | ACCESS教程网 | SQL SERVER教程网 | C语言教程网 | JAVASCRIPT教程网 |
ASP教程网 | ASP.NET教程网 | CorelDraw教程网 |