❶ 鎴戠殑鐧婚檰鐣岄潰鐨勮繛鎺ユ寜閽鎬庝箞鏄鐏拌壊鐨勶紵鐐逛笉浜嗭紒
鍦ㄦ棩甯告搷浣滅殑鏃跺欙紝濡傛灉鍑虹幇鐧诲綍鐣岄潰鐨勮繛鎺ユ寜閽鏄鐏拌壊鐨勶紝褰撶偣鍑绘彁浜ゅ悗锛屾彁浜ゆ寜閽鍙樼伆鑹蹭笉鍙鐢锛岃繖鏍峰彲鏈夋晥闃叉㈤噸澶嶆彁浜わ紝鏈浠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>
绗涓夌嶏紝璺熶笂闈㈢殑绫讳技