Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to solve the problem of non-editable jquery select

2025-01-20 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article focuses on "how to solve the jquery select non-editable problem", interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn "how to solve the jquery select non-editable problem".

Jquery select non-editable solutions: 1, open the corresponding js code file; 2, change the drop-down box to input;3, remove the "readonly=" readonly "".

This article operating environment: windows7 system, jquery3.2.1 version, DELL G3 computer

What if jquery select is not editable?

Js and jquery perfectly solve the drop-down box select is not editable but can be passed value

/ / move the mouse into the drop-down box to lock it unavailable $('# drop-down box ID') .Mouseenter (function () {$('# drop-down box ID'). Attr ("disabled", "true");}); / / move to other places to release the lock (originally intended to remove the lock from the drop-down box, but it does not take effect, can only be moved to another place instead, boss can answer? ) $("* [idled drop-down box ID']") .Mouseenter (function () {$('# drop-down box ID') .removeAttr ("disabled");})

If allowed, replace the drop-down box with input using the list attribute

Gender: boys and girls

Removing readonly= "readonly" is an editable and associative drop-down box, while keeping it is not editable.

At this point, I believe you have a deeper understanding of "how to solve the jquery select non-editable problem". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

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.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report