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
WBOYOriginal
2016-05-16 17:29:371183browse
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
Statement:
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