javascript - 如何使单选按钮转到另一个 HTML?
问题描述
我想做类似的事情,当我单击单选按钮时,它会转到另一个 HTML。
我的代码:
<div class="FilterNetwork">
<div class="network">
<input type="radio" value="Expertise" unchecked name="radioBtn" onclick="expertise.html"> <label> Expertise</label><br>
<input type="radio" value="Location" unchecked name="radioBtn"> <label> Location</label><br>
<input type="radio" value="Workplace" unchecked name="radioBtn"> <label> Workplace </label><br>
<input type="radio" value="Past Job" unchecked name="radioBtn"> <label>Past Job</label><br>
</div>
</div>
解决方案
调整 onclick 属性,例如 onclick="location.href='example.html'"。
推荐阅读
- php - Zoom Api - 我无法更新会议
- amazon-web-services - 最新的 localstack 在 Linux 中无法正确启动 Dynamodb
- python - 我的不和谐机器人正在对我删除的命令做出反应
- ios - 将“#”(井号、井号)本地化为序数指示符是否安全?(例如“#1”、“#2”)
- sql - 如何使用 Snowsql 运行具有多个 .sql 文件的 .sql 文件?
- ios - 应用程序 openURL 提供无效的 url
- sql - 有没有办法将行值从 3 连接到 3?
- c - 为什么如果我声明一个没有指定长度的字符串数组,它仍然有效?有或没有动态分配
- mysql - 获取多个标签
- azure-devops - 这是否可以在 yaml 中为目标管道创建多个管道触发器?