layui 的单选框






placeholder="请输入发放额度" autocomplete="off" class="layui-input">






placeholder="请输入拒绝理由" autocomplete="off" class="layui-input">








name="expiresDate" id="expiresDate"
value=""
>


layui.use('form', function () {
var form = layui.form;
form.on('radio(tongguo)', function (data) {
// console.log(data.elem);
// alert(data.value);//判断单选框的选中值
//alert(data.othis);
// layer.tips('开关checked:' + (this.checked ? 'true' : 'false'), data.othis);
console.log(data.value);
if (data.value == 2) { // 驳回
$("#bohui").attr("class", "layui-hide");
} else if (data.value == 1) {
$("#bohui").attr("class", "");
}
});

});

转载于:https://www.cnblogs.com/jwlfpzj/p/9172567.html

你可能感兴趣的:(layui 的单选框)