What to do if the jquery control does not edit

藏色散人
Release: 2021-11-18 10:29:17
Original
1717 people have browsed it

Solution to the non-editable jquery control: 1. Turn on disabled through "$("#id").attr("disabled","disabled"); 2. Turn on disabled through "$("#id ").removeAttr("disabled");"Turn off disabled.

What to do if the jquery control does not edit

The operating environment of this article: windows7 system, jquery3.2.1 version, DELL G3 computer

What should I do if the jquery control does not edit?

jQuery controls the input that cannot be edited

1. Turn on disabled, but the input cannot be edited

$("#id").attr("disabled","disabled");
Copy after login

2. Turn off disabled

$("#id").removeAttr("disabled");
Copy after login

Ordinary js It is written like this, document.getElementById("id").disabled = false;

Wrong writing:

$("#id").attr("disabled","false");
Copy after login

Recommended learning: "jquery video Tutorial

The above is the detailed content of What to do if the jquery control does not edit. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!