首页 > 代码库 > weui 弹框中的单选效果
weui 弹框中的单选效果
<!--性别修改弹框--> <div class="weui_dialog_alert" id="doctorSexDialog" style="display: none;"> <div class="weui_mask"></div> <div class="weui_dialog"> <div class="weui_dialog_hd"><strong class="weui_dialog_title">医生性别</strong></div> <div class="weui_dialog_bd"> <!--选择性别--> <div class="weui-cells weui-cells_radio"> <label class="weui-cell weui-check__label" for="r1"> <div class="weui-cell__bd">男</div> <div class="weui-cell__ft"> <input required="" type="radio" class="weui-check" name="sex" value="男" id="r1" tips="请选择性别"> <span class="weui-icon-checked"></span> </div> </label> <label class="weui-cell weui-check__label" for="r2"> <div class="weui-cell__bd">女</div> <div class="weui-cell__ft"> <input type="radio" name="sex" class="weui-check" value="女" id="r2"> <span class="weui-icon-checked"></span> </div> </label> </div> <!--选择性别--> </div> <div class="weui_dialog_ft"> <div id="saveDoctorSex" class="weui_btn_dialog primary">确定</div> </div> </div> </div>
$(‘#saveDoctorSex‘).click(function(){ var doctorSex = $("input[name=‘sex‘]:checked").val(); console.log("3416456" + doctorSex); $(‘#doctorSexShow‘).html(doctorSex); });
weui 弹框中的单选效果
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。