0
此代码是为了避免在形式双击用的setTimeout禁用按钮几秒钟提交功能,避免双击不输入工作提交铬只
它运作良好,在IE &火狐但形式上绝不提交在Chrome
<input type="submit" id="button" class="button" onclick="foo(this);" name="submit_forgot" value="Submit" />
和这里的功能:
function foo(obj) {
obj.disabled = true;
setTimeout(function() {
obj.disabled = false;
}, 2000);
}
感谢您的帮助!
非常感谢您!它运作良好!对于像我这样的其他newby,我不得不将它包装在$(document).ready(function(){}中。 – Vince