Summary of how to operate Radio using jquery_jquery
Radio is often used in development to achieve user selection effects. I have accumulated some methods of using JQUERY to operate Radio in the project. I will share them here for friends in need to learn from.
1. Change the radio selection and trigger some effects
$("input:radio[name='dialCheckResult']").change(function (){ //Dial
alert(“123”);
});
2. Make all radios in the page available.
$("input:radio").attr("disabled",false);
3. Make all radios in the page unavailable.
$("input:radio").attr("disabled","disabled");
4. Make a radio selected.
$("input:radio[name='dialCheckResult']").eq(0).attr("checked",true);
5. Make the "unselected" radio in the page unavailable.
$("input:radio:not([checked])").attr("disabled","disabled");
6. Traverse the radios in the selected state. Except for one radio, the radio settings in the other "selected" states are in the "unselected" state.
$('input:radio:checked').each(function(i,val){
if(val.name != "dialCheckResult" ){
$("input:radio[name='" val.name "']:checked").attr('checked',false);
}
});
7. Make all "unselected" radios unavailable.
$("input:radio:not([checked])").attr("disabled","disabled");
8. Get the radio value of a selected specific NAME.
var dialCheckResult=$("input:radio[name='dialCheckResult']:checked").val() ;
9. Put all radios in the "selected" state into the "unselected" state.
$('input:radio:checked').attr('checked',false);
10. Put all radios on the page into the "selected" or "unselected" state.
$("input:radio").attr("checked",true);
$("input:radio").attr("checked",false);

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Replace String Characters in JavaScript

HTTP Debugging with Node and http-console

Custom Google Search API Setup Tutorial
