radio单选中电子邮箱
把下方写着电子邮箱的div隐藏,而单选中手机
把下方写着手机的div隐藏,代码如下,如何写js
<div class="rs-validation"> <label for="">验证方式</label> <form> <div class="formemail"> <input type="radio" checked="checked" name="validation" value="1"> <span>电子邮箱</span> </div> <div class="formmobile"> <input type="radio" name="validation" value="2"> <span>手机</span> </div> </form></div><div class="email-wrap"> 电子邮箱</div><div class="moblie-wrap" style="display:none"> 手机号</div>
相关分类