In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)05/31 Report--
Today, I would like to share with you the relevant knowledge about how jquery deletes hidden attributes. The content is detailed and the logic is clear. I believe most people still know too much about this, so share this article for your reference. I hope you can get something after reading this article. Let's take a look at it.
Delete hidden attribute method: 1, directly use removeAttr () to delete hidden attribute, syntax "element .removeAttr (" hidden ")"; 2, use prop () to set the value of hidden attribute to empty, syntax "element .prop" ("hidden", "") ".
The operating environment of this tutorial: windows7 system, jquery1.10.2 version, Dell G3 computer.
HTML hidden attribute
The hidden attribute specifies that the element is hidden. Hidden elements are not displayed.
If you add this attribute to an element, the element is hidden.
Example:
This is a visible paragraph.
This is a hidden paragraph that is now shown.
This is a visible paragraph.
How does jquery delete the hidden attribute
1. Delete the hidden attribute using removeAttr ()
(function () {$("button") .click (function () {$("p"). RemoveAttr ("hidden");}))
This is a visible paragraph.
This is a hidden paragraph that is now shown.
This is a visible paragraph.
Delete hidden attribute
2. Use prop () to set the value of the hidden property to empty
$(function () {$("button") .click (function () {$("p") .prop ("hidden", ");})})
This is a visible paragraph.
This is a hidden paragraph that is now shown.
This is a visible paragraph.
Delete hidden attribute
This is all the content of the article "how jquery deletes hidden attributes". Thank you for reading! I believe you will gain a lot after reading this article. The editor will update different knowledge for you every day. If you want to learn more knowledge, please pay attention to 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.