当前位置: 移动技术网 > IT编程>网页制作>CSS > 单选框radio改变事件

单选框radio改变事件

2019年07月30日  | 移动技术网IT编程  | 我要评论
<input type="radio" name="bedstatus" id="allot" checked="checked" value="allot">allot
<input type="radio" name="bedstatus" id="transfer" value="transfer">transfer




$(document).ready(function() {
    $('input[type=radio][name=bedstatus]').change(function() {
        if (this.value == 'allot') {
            alert("allot thai gayo bhai");
        }
        else if (this.value == 'transfer') {
            alert("transfer thai gayo");
        }
    });
});

  

如对本文有疑问, 点击进行留言回复!!

相关文章:

验证码:
移动技术网