Home  >  Article  >  Web Front-end  >  Jquery显示和隐藏元素或设为只读(含Ligerui的控件禁用,实例说明介绍)_jquery

Jquery显示和隐藏元素或设为只读(含Ligerui的控件禁用,实例说明介绍)_jquery

WBOY
WBOYOriginal
2016-05-16 17:29:371084browse
一、隐藏和显示元素
复制代码 代码如下:

$('#button_save_12').css('display', 'none');  // 隐藏按钮
$('#button_save_12').css('display', 'display');  // 显示按钮

// 或者采取
复制代码 代码如下:

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

二、设为禁用,只读
复制代码 代码如下:

 $('#button_save_12').attr("disabled", "disabled");  // 禁用
 $('#button_save_12').attr("disabled", "disabled");  // 取消禁用

三、Ligerui设为禁用
复制代码 代码如下:

$("#button_save_12").ligerComboBox({ width: '118', disabled: true });  // 禁用 false 是启用
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