单选框radio改变事件
程序员文章站
2022-10-25 16:57:36
Allot Transfer $(document).ready(function() { $('input[type=radio][name=bedStatus]').change(function() { if (this.value == 'allot') { alert("Allot Tha... ......
<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");
}
});
});