In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly shows you "jquery how to cancel radio", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "jquery how to cancel radio" this article.
Jquery cancels radio method: 1, use attr () function, syntax "$(" input "). Attr (" checked ", false);"; 2, use prop () function, syntax "$(" input "). Prop (" checked ", false);".
The operating environment of this tutorial: windows7 system, jquery1.10.2 version, Dell G3 computer.
The method of canceling radio by jquery
In jquery, you only need to set the checked property of the radio radio box to the false value to uncheck radio.
There are two ways to set property values:
Attr ()
Prop ()
Example:
Use attr () to set the checked attribute value
$(document) .ready (function () {$("button") .click (function () {$("input"). Attr ("checked", false);}) This month this year, the selection will be canceled.
Use prop () to set the checked attribute value
$(document) .ready (function () {$("button") .click (function () {$("input"). Prop ("checked", false);})
The effect is all the same.
The above is all the contents of the article "how to cancel radio by jquery". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.