Check Radio Button Using jQuery

Check Radio Button Using jQuery – There are many ways to check a radio button. Here in this tutorial we are going to explain how you can check radio button in jQuery. We Will Explain this with example and demo.

Check Radio Button Using jQuery Example

Checking radio button in jQuery is very simple. You can check radio button simply as below –

Check Radio Button Using jQuery: Example

<!DOCTYPE html>
<title>jQuery Scrolltop Demo example</title>
<script type="text/javascript" src="//">
<script type="text/javascript">
function checkRadio(){
$("#radio2").prop("checked", true);
        <input type='radio' id='radio1' name='type' value='1' />
        <input type='radio' id='radio2' name='type' value='2' />
        <input type='radio' id='radio3' name='type' value='3' /> 

<button onclick="checkRadio()">Check Radio</button>  

Try it »

The above example will select the radio button radio2 and set the property as checked. If you run the above example it will produce output something like this –

Check Radio Button Using jQuery Example


Add Comment

📖 Read More