❶ 鎴戠殑鐧婚檰鐣岄潰鐨勮繛鎺ユ寜閽鎬庝箞鏄鐏拌壊鐨勶紵鐐逛笉浜嗭紒
鍦ㄦ棩甯告搷浣滅殑鏃跺欙紝濡傛灉鍑虹幇鐧誨綍鐣岄潰鐨勮繛鎺ユ寜閽鏄鐏拌壊鐨勶紝褰撶偣鍑繪彁浜ゅ悗錛屾彁浜ゆ寜閽鍙樼伆鑹蹭笉鍙鐢錛岃繖鏍峰彲鏈夋晥闃叉㈤噸澶嶆彁浜わ紝鏈浠g爜灝辨槸瀹炵幇榪欐牱涓涓鍔熻兘銆備粠浠g爜灝卞彲浠ョ湅鍑猴紝鎴戜滑鍙闇鍦ㄦ彁浜ゆ寜閽涓婂姞鍏ヨ繖涓鍙ワ細
onclick="javascript:{this.disabled=true;document.form1.submit();}"錛屾剰鎬濇槸褰撴寜閽鐐瑰嚮鍚庯紝灝嗘寜閽鐨勪笉鍙鐢ㄥ睘鎬ц劇疆涓簍rue錛岃繖鏍鋒寜閽灝卞彉鐏頒簡
<html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><title>琛ㄥ崟鎻愪氦鍚庢寜閽鍙樻垚鐏拌壊</title></head><body><form name=form1 method="POST" action="/" target=_blank><p><input type="text" name="T1" size="20"><input type="button" value="鎻愪氦" onclick="javascript:{this.disabled=true;document.form1.submit();}"><input type="reset" value="閲嶇疆" name="B2"></p></form></body></html>
[Ctrl+A 鍏ㄩ 娉:寮曞叆澶栭儴Js闇鍐嶅埛鏂頒竴涓嬮〉闈㈡墠鑳芥墽琛宂
絎浜岀嶆柟娉曪細閫氳繃onSubmit浜嬩歡瀹炵幇錛屽苟涓斿彲浠ュ皢鍙樼伆鎸夐挳鍙樹負鍙鐢
鍦╢orm閲岄潰娣誨姞 onSubmit浜嬩歡錛屽傛灉琛ㄥ崟鍔犲叆浜嗗垽鏂錛岄偅涔堣繖涓鏂規硶鐩存帴灝卞彲浠ョ敤浜嗭紝璁頒綇灝辨斁鍒版渶鍚庯紝鍚﹀垯涓寮濮嬪氨涓虹伆浜嗭紝浣嗘垜浠鍔犱笂浜嗕竴涓浣挎彁浜ゆ寜閽鍙樹負鍙鐢ㄧ殑浠g爜錛
鍗沖彲闃叉㈤噸澶嶆彁浜や俊鎮錛屼篃鍙浠ラ槻姝浠g爜闂棰樺艱嚧涓嶅彲鎻愪氦鐨勬儏鍐
澶嶅埗浠g爜 浠g爜濡備笅:
<form name=form1 action="" onSubmit=" return closebut()" >
<input name="imageField" type="submit" class="inputbut" value="紜瀹" /><br>
<input type="button" name="hui" id="hui" value="璁╂彁浜ゆ寜閽鍙鐢" onclick="document.form1.imageField.disabled=false" />
</form>
<script>
function closebut(){
document.form1.imageField.disabled=true;
}
</script>
絎涓夌嶏紝璺熶笂闈㈢殑綾諱技