javascript - 协助使用 javascript 功能
问题描述
如果选中了所有复选框,我正在尝试编写代码来激活超链接。下面是我编写的将生成复选框的代码。选中所有复选框后,如何添加启用超链接按钮的功能?
```<head>
<title>Check/Uncheck the checkbox using JavaScript</title>
```</head>
```<body>
<center>
<h1 style="color:green">To ensure HIPAA compliance and follow company policy:</h1>
<h2>Check the checkbox in order to continue</h2>
<form>
<div>
<input type="button" onclick="checkAll()" value="CHECK ALL">
</div>
<div>
<label>
<input type="checkbox" class="check3"> I agree to use no parts of my actual name in ```my screen name.
</label>
</div>
<div>
<label>
<input type="checkbox" class="check3"> I agree to not to use open room chat to share ```personal information, knowing that open room chat is visible by all who enter the room.
</label>
</div>
<div>
<label>
<input type="checkbox" class="check3"> I agree to provide all personal identifiable ```information to the intake professional and therapist.
</label>
</div>
<div>
<label>
<input type="checkbox" class="check3"> I agree to refrain from providing personal ```information of my own or the therapist to other individuals in the lobby.
</label>
</div>
</form>
</center>
```</body>
```<script type="text/javascript">
//create function of check/uncheck box
function checkAll() {
var inputs = document.querySelectorAll('.check3');
for (var i = 0; i < inputs.length; i++) {
inputs[i].checked = true;
}
}
window.onload = function() {
window.addEventListener('load', checkAll, false);
}
```</script>
<input type="button" onclick="(https://app.sococo.com/meet/5725dc80632b143d168fbf3155bcddf0)" ```value="Start Your Journey">
```</html>
解决方案
推荐阅读
- c# - 使用带有字符串插值的 REGEX
- python-3.x - M2CryptoWin64 Python3.5 Windows10 Pycharm安装和__m2crypto导入错误
- java - 如何将多个参数添加到 XPath 并将 %s 替换为参数
- java - 在 Java 中一次从 IBM MQ 读取多条消息
- c# - Azure Cosmos DB - Where 查询中的动态 OR 子句
- java - 使用json解析Java测试数据处理
- c++ - 在不同的 .cpp 文件中使用相同的 C++ 模板是否会重复代码?
- mysql - 在 SQL 中 JOIN 后获取最后 N 条记录?
- extjs - 在 Extjs store Load 中,将多个查询值添加到同一个查询中,例如 store.load({ Params: { status: 2 or 3 or 4} });
- sql - 如何限制每个值的行数?