首页 > 解决方案 > 如何使单选按钮转到另一个 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>

标签: javascripthtml

解决方案


调整 onclick 属性,例如 onclick="location.href='example.html'"。


推荐阅读