87,901
社区成员
发帖
与我相关
我的任务
分享
<script type="text/javascript">
window.onload=function(){
var btn=document.getElementById("btn");
btn.setAttribute("disabled","disabled");
setTimeout(function(){
btn.removeAttribute("disabled");
},20000);
};
</script>
</head>
<body>
<div>
<form action="a.html" method="post">
<input type="submit" id="btn"/>
</form>
</div>
</body>
var button = document.getElementById('button');
button.onclick = function(){
var dom = this;
this.disabled = 'disabled';
setTimeout(function(){
dom.disabled = false;
},20000)
}