Home > Web Front-end > JS Tutorial > Jquery shows and hides elements or sets them as read-only (controls including Ligerui are disabled, examples are introduced)_jquery

Jquery shows and hides elements or sets them as read-only (controls including Ligerui are disabled, examples are introduced)_jquery

WBOY
Release: 2016-05-16 17:29:37
Original
1178 people have browsed it
1. Hiding and showing elements
Copy the code The code is as follows:

$('#button_save_12').css('display', 'none'); // Hide button
$('#button_save_12').css('display', 'display'); // Show button

// Or take
Copy code The code is as follows:

$('#button_save_12').hide();
$('#button_save_12').show();

2. Set to disabled, read-only
Copy code The code is as follows:

$('#button_save_12').attr("disabled ", "disabled"); // Disable
$('#button_save_12').attr("disabled", "disabled"); // Undisable

3. Ligerui is disabled ").ligerComboBox({ width: '118', disabled: true }); // disable false is enable
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