日期:2014-05-16  浏览次数:20395 次

求JS控制Submit按钮 点击后10秒无法使用
HTML code
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
</head>
<script  type="text/javascript">
    function f_submit() {
        b1.disabled = "true";
    }

</script>
<body>
<form action="SaveOrderBySearchAir.aspx" method="post" name="Orderbyter" id="Orderbyter" onsubmit="return f_submit();">
<input type="submit" class="sub" value="button"  id="b1"/>
</form>

</body>
</html>



------解决方案--------------------
在点击的onclick事件中把input的disabled属性设成disabled
然后settimeout 十秒后再把disabled属性去掉