【发布时间】:2014-04-30 09:57:07
【问题描述】:
谁能帮助我如何根据点击事件启用按钮。
我需要一个场景,我们有 2 个按钮,Button1 和 Button2(默认禁用)。
点击 Button1 后,说 10 秒后应该启用我的 Button2。
我在下面的代码中哪里做错了?单击 Button1 后,我的 Button2 未启用。谁能帮帮我。
提前致谢, 乌代
<html>
<Head>
<Title>Synchronization</Title>
</head>
<script>
function PleaseWait()
{
document.getElementsByName("SampleButton2").disabled=false;
}
</script>
<body>
<input type="button" name="SampleButton1" value="Button1" onclick="PleaseWait()">
<input type="button" name="SampleButton2" value="Button2" disabled>
</body>
</html>
【问题讨论】: