jQuery EasyUI使用教程之建立一個連接按鈕

<jQuery EasyUI最新版下載>html

本教程主要爲你們展現如何使用jQuery EasyUI建立一個連接按鈕。一般狀況下,使用「button/」元素來建立一個按鈕;使用「a/」元素來建立連接按鈕。因此事實上一個連接按鈕是一個顯示爲按鈕樣式「a/」元素。ui

建立一個連接按鈕

查看演示spa

爲了建立一個連接按鈕,你所須要作的就是添加一個名爲'easyui-linkbutton'的類屬性到「a/」元素中:code

< 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圖片。orm

有時你可能須要禁用或啓用該連接按鈕,下面的代碼演示瞭如何禁用連接按鈕:htm

$(selector).linkbutton('disable'); // call the 'disable' method教程

有興趣的朋友能夠點擊查看更多有關jQuery EasyUI的文章圖片

相關文章
相關標籤/搜索