Home  >  Article  >  Web Front-end  >  jQuery EasyUI 菜单与按钮之创建简单的菜单和链接按钮_jquery

jQuery EasyUI 菜单与按钮之创建简单的菜单和链接按钮_jquery

WBOY
WBOYOriginal
2016-05-16 15:31:341310browse

菜单(Menu)定义在一些 DIV 标记中,如下所示:

 
New
Open
Word
Excel
PowerPoint
Save
Exit

当菜单创建之后是不显示的,调用 'show' 方法显示它或者调用 'hide' 方法隐藏它:

 $('#mm').menu('show', {
  left: 200,
  top: 100
 });

创建链接按钮(Link Button)

通常情况下,使用

为了创建链接按钮(Link Button),所有您需要做的就是添加一个名为 'easyui-linkbutton' 的 class 属性到 元素:

正如您所看到的,iconCls 属性是一个 icon 的 CSS class 样式,它在按钮上显示一个 icon 图片。

有时候您需要禁用链接按钮(Link Button)或者启用它,下面的代码演示了如何禁用一个链接按钮(Link Button):

$(selector).linkbutton('disable'); // call the 'disable' method
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