码迷,mamicode.com
首页 > Web开发 > 详细

jQuery EasyUI使用教程之创建一个链接按钮

时间:2015-10-27 11:42:33      阅读:265      评论:0      收藏:0      [点我收藏+]

标签:

<jQuery EasyUI最新版下载>

本教程主要为大家展示如何使用jQuery EasyUI创建一个链接按钮。通常情况下,使用“button/”元素来创建一个按钮;使用“a/”元素来创建链接按钮。所以事实上一个链接按钮是一个显示为按钮样式“a/”元素。

技术分享

查看演示

为了创建一个链接按钮,你所需要做的就是添加一个名为‘easyui-linkbutton‘的类属性到“a/”元素中:

< div style = "padding:5px;background:#fafafa;width:500px;border:1px solid #ccc" >
< a href = "#" class = "easyui-linkbutton" iconcls = "icon-cancel" >Cancel</ a >
< a href = "#" class = "easyui-linkbutton" iconcls = "icon-reload" >Refresh</ a >
< a href = "#" class = "easyui-linkbutton" iconcls = "icon-search" >Query</ a >
< a href = "#" class = "easyui-linkbutton" >text button</ a >
< a href = "#" class = "easyui-linkbutton" iconcls = "icon-print" >Print</ a >
</ div >
 
< div style = "padding:5px;background:#fafafa;width:500px;border:1px solid #ccc" >
< a href = "#" class = "easyui-linkbutton" plain = "true" iconcls = "icon-cancel" >Cancel</ a >
< a href = "#" class = "easyui-linkbutton" plain = "true" iconcls = "icon-reload" >Refresh</ a >
< a href = "#" class = "easyui-linkbutton" plain = "true" iconcls = "icon-search" >Query</ a >
< a href = "#" class = "easyui-linkbutton" plain = "true" >text button</ a >
< a href = "#" class = "easyui-linkbutton" plain = "true" iconcls = "icon-print" >Print</ a >
< a href = "#" class = "easyui-linkbutton" plain = "true" iconcls = "icon-help" ></ a >
< a href = "#" class = "easyui-linkbutton" plain = "true" iconcls = "icon-save" ></ a >
< a href = "#" class = "easyui-linkbutton" plain = "true" iconcls = "icon-back" ></ a >
</ div >

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

有时你可能需要禁用或启用该链接按钮,下面的代码演示了如何禁用链接按钮:

$(selector).linkbutton(‘disable‘); // call the ‘disable‘ method

有兴趣的朋友可以点击查看更多有关jQuery EasyUI的文章

jQuery EasyUI使用教程之创建一个链接按钮

标签:

原文地址:http://my.oschina.net/u/2317468/blog/522525

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!