Home>Article>Web Front-end> How to set non-clickable in jquery
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.
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);
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!