<script>
var i=0;
function formCheck(){i++;if (i>1) {document.form.submit1.disabled = true;}return true;}
function presskey(eventobject){if(event.ctrlKey && window.event.keyCode==13){i++;if (i>1) {alert('帖子正在发出,请耐心等待!');return false;}this.document.form.submit();document.form.submit1.disabled = true;}}
</script>
支持CTRL+ENTER提交。只能提交一次。
<form name="form" method="post" action='' οnsubmit="return formCheck()">
<TEXTAREA name=content rows=6 cols=79 οnkeydοwn=presskey()></TEXTAREA> <BR><INPUT tabIndex=4 type=submit value="Ctrl+Enter 回复主题" name=submit1 οnclick="return formCheck()"> <INPUT type=reset value=" 重 写 主 题 " name=reset οnclick="checkclick('该项操作要清除全部的内容,您确定要清除吗?')"></form>
========================
<script>
function disable()
{
document.form1.Submit.disabled=true;
}
</script>
<form name="form1" method="post" action="" οnsubmit="disable()">
<p>
<input type="submit" name="Submit" value="提交"
</p>
</form>
http://www.corange.cn/archives/2008/03/377.html