Answers for "how to chenge radio button to on off button"

5

change on radio button

$('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");
    }
});
Posted by: Guest on April-30-2020
0

how to uncheck a radio button

//jQuery
$('input[name="radio"]').prop("checked", false);

//Vanilla JS
document.getElementById('radio-button').checked = false;
Posted by: Guest on April-18-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language