Home > Web Front-end > JS Tutorial > body text

How to set non-clickable in jquery

藏色散人
Release: 2020-11-30 16:57:58
Original
2133 people have browsed it

Jquery method to set non-clickable: first open the corresponding code file; then pass "$("input").attr('readonly', true);$("textarea").attr('readonly ', true);" method can set page elements to be non-clickable.

How to set non-clickable in jquery

Recommended: "jquery video tutorial"

The operating environment of this tutorial: windows7 system, jquery3.2.1 version, This method works for all brands of computers.

jquery sets page elements to be non-clickable, non-editable, and read-only

The code is as follows:

$("input").attr('readonly', true);
$("textarea").attr('readonly', true);
$(':radio').attr('disabled', true);
$(':checkbox').attr('disabled', true);
$(':button').attr('disabled', true);
$('a').removeAttr('onclick');
$('select').attr('disabled', true);
Copy after login

The above is the detailed content of How to set non-clickable in jquery. 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!