所以我有一个时钟脚本,当您单击开始时,将显示当前时间。单击“停止”时也会发生同样的情况。我现在想要发生的是,当我单击第一个按钮时,第二个按钮将被激活,因为您只能在单击第一个按钮时单击第二个按钮。我的 HTML**<!DOCTYPE html><html dir="ltr"><head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous"> <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script> <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script> <link rel="stylesheet" href="style/new-style.css"> <title>Digital Clock</title></head><body><center> <button class="panel2" onclick="CurrentTime()">Start rit</button> <p>Start van de Rit: <span id="Start Rit" /></p> <button class="panel1" onclick="ZaWarduu()">Stop rit</button> <p>Einde van de Rit: <span id="Einde Rit"/></p> <p>Clock : <span id="Clock" /></p> <script type="text/javascript"> </script> </center> </body> </html>我查看了有关堆栈溢出的几个类似问题,并尝试查看谷歌中的一些搜索结果,不幸的是我找不到任何内容。
- 1 回答
- 0 关注
- 119 浏览
添加回答
举报
0/150
提交
取消