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)06/02 Report--
Editor to share with you how jquery changes the elements to read-only. I hope you will get something after reading this article. Let's discuss it together.
Jquery changes the element to read-only method: 1, use the "$(specified element)" statement to get the specified element object; 2, use the attr () method and readonly attribute to change the element into a read-only state, and the syntax is "element object .attr (" readonly "," readonly ")".
The operating environment of this tutorial: windows10 system, jquery3.2.1 version, Dell G3 computer.
In css, you can use the attr () method to change the element to a read-only state, and the attr () method to set or return the property value of the selected element.
The syntax is:
$(selector) .attr (attribute,value)
Just set the readonly property of the element to readonly. The readOnly property sets or returns whether the text field is read-only.
Let's take a look at how to make a text box element read-only through an example. Examples are as follows:
Function demo () {$("input [name=demo]") .attr ("readonly", "readonly");}
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.