jquery 操作 Radio大全
1、改变radio的选择,触发一些效果
代码如下:
<code class="javascript">$("input:radio[name='dialCheckResult']").change(function (){ //拨通 alert(“123”); });</code>
2、让页面中所有的radio可用
<code class="javascript">$("input:radio").attr("disabled",false);</code>
3、让页面中所有的radio不可用
<code class="javascript">$("input:radio").attr("disabled","disabled");</code>
4、让某个radio置于选中状态
<code class="javascript">$("input:radio[name='dialCheckResult']").eq(0).attr("checked",true);</code>
5、让页面中“未选中”状态的radio不可用
<code class="javascript">$("input:radio:not([checked])").attr("disabled","disabled");</code>
6、遍历选中状态的radio,除了某一个radio之外,其他的“选中”状态的radio设定是“未选中”状态
代码如下:
<code class="javascript">$('input:radio:checked').each(function(i,val){ if(val.name != "dialCheckResult" ){ $("input:radio[name='"+val.name+"']:checked").attr('checked',false); } });</code>
7、让所有“未选中”状态的radio不可用
<code class="javascript">$("input:radio:not([checked])").attr("disabled","disabled");</code>
8、获得某个选中的特定NAME的radio的值
<code class="javascript">var dialCheckResult=$("input:radio[name='dialCheckResult']:checked").val() ;</code>
9、让所有“选中”状态的radio置于“未选中”状态
<code class="javascript">$('input:radio:checked').attr('checked',false);</code>
10、让页面中的radio都置于“选中”状态或“未选中”状态
<code class="javascript">$("input:radio").attr("checked",true); $("input:radio").attr("checked",false);</code>

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

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

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











LinuxDeploy operating steps and precautions LinuxDeploy is a powerful tool that can help users quickly deploy various Linux distributions on Android devices, allowing users to experience a complete Linux system on their mobile devices. This article will introduce the operating steps and precautions of LinuxDeploy in detail, and provide specific code examples to help readers better use this tool. Operation steps: Install LinuxDeploy: First, install

How to use PUT request method in jQuery? In jQuery, the method of sending a PUT request is similar to sending other types of requests, but you need to pay attention to some details and parameter settings. PUT requests are typically used to update resources, such as updating data in a database or updating files on the server. The following is a specific code example using the PUT request method in jQuery. First, make sure you include the jQuery library file, then you can send a PUT request via: $.ajax({u

With the popularity of smartphones, the screenshot function has become one of the essential skills for daily use of mobile phones. As one of Huawei's flagship mobile phones, Huawei Mate60Pro's screenshot function has naturally attracted much attention from users. Today, we will share the screenshot operation steps of Huawei Mate60Pro mobile phone, so that everyone can take screenshots more conveniently. First of all, Huawei Mate60Pro mobile phone provides a variety of screenshot methods, and you can choose the method that suits you according to your personal habits. The following is a detailed introduction to several commonly used interceptions:

Title: jQuery Tips: Quickly modify the text of all a tags on the page In web development, we often need to modify and operate elements on the page. When using jQuery, sometimes you need to modify the text content of all a tags in the page at once, which can save time and energy. The following will introduce how to use jQuery to quickly modify the text of all a tags on the page, and give specific code examples. First, we need to introduce the jQuery library file and ensure that the following code is introduced into the page: <

Title: Use jQuery to modify the text content of all a tags. jQuery is a popular JavaScript library that is widely used to handle DOM operations. In web development, we often encounter the need to modify the text content of the link tag (a tag) on the page. This article will explain how to use jQuery to achieve this goal, and provide specific code examples. First, we need to introduce the jQuery library into the page. Add the following code in the HTML file:

Table of Contents Astar Dapp Staking Principle Staking Revenue Dismantling of Potential Airdrop Projects: AlgemNeurolancheHealthreeAstar Degens DAOVeryLongSwap Staking Strategy & Operation "AstarDapp Staking" has been upgraded to the V3 version at the beginning of this year, and many adjustments have been made to the staking revenue rules. At present, the first staking cycle has ended, and the "voting" sub-cycle of the second staking cycle has just begun. To obtain the "extra reward" benefits, you need to grasp this critical stage (expected to last until June 26, with less than 5 days remaining). I will break down the Astar staking income in detail,

NASA has confirmed the existence of a global electric field around Earth, achieved through a recent rocket launch. This is a big deal, since this is the first direct measurement of a phenomenon which has been long theorized but has never been observe

Forgetting the Win8 computer startup password is a problem that many people encounter when using computers on a daily basis. When we forget the login password, we will be unable to enter the system normally, causing inconvenience to our daily use. If you happen to encounter this problem, don’t worry. Below I will introduce some simple operations to help you quickly restore the power-on password of your Win8 computer. Method 1: Use Microsoft account password. If you use a Microsoft account to log in to your Win8 computer, you can try using the password of that account.
