jquery chek radio
// jQuery version 1.6 or above use:
$("#myRadioID").prop("checked", true);
//jQuery versions below 1.6 use:
$("#myRadioID").attr('checked', 'checked');$(document).ready(function(){
$('#submit_button').click(function() {
if (!$("input[name='name']:checked").val()) {
alert('Nothing is checked!');
return false;
}
else {
alert('One of the radio buttons is checked!');
}
});
});//<input type="radio" name="book_condition" value="3" >
$("input:radio[value='3'][name='book_condition']").prop('checked',true);
Also in JavaScript:
- how to use the match function in javascript for regex
- using multiparty with node js express
- how to scroll down to the bottom of a div using javascript
- asking questions javascript in console
- js replace blogger thumb
- switch javascript
- what is jsonwebtoken
- open new window chrome extension
- javascript create svg
- js array to csv
- XJavascript:$.ge
- copy link to clipboard
- js select option value when selected
- regex for number and letters
- how to create scroll to top button in reactjs example code
- how to check if 2 images are touching js
- how to use react router
- date object javascript
- postfix date javascript
- js kill process
- notification dropdown bootstrap
- javascript array add
- how to prevent event capturing in javascript
- python json.dumps pretty print