zoukankan      html  css  js  c++  java
  • LinkButton(按钮)

    使用$.fn.linkbutton.defaults重写默认值对象。

    按钮组件使用超链接按钮创建。它使用一个普通的<a>标签进行展示。它可以同时显示一个图标和文本,或只有图标或文字。按钮的宽度可以动态和折叠/展开以适应它的文本标签。

     

    使用案例

    创建按钮

    使用标签创建按钮更加简单。

     
    1. <a id="btn" href="#" class="easyui-linkbutton" data-options="iconCls:'icon-search'">easyui</a>  

    也可以使用Javascript创建按钮。

     
    1. <a id="btn" href="#">easyui</a>   
    2. $('#btn').linkbutton({   
    3.     iconCls: 'icon-search'  
    4. });  
    处理按钮的点击

    点击按钮会将用户引导到其他页面。

     
    1. <a href="otherpage.php" class="easyui-linkbutton" data-options="iconCls:'icon-search'">easyui</a>  

    下面的示例提示了一个警告信息。

     
    1. <a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-search'"  
    2.         onclick="javascript:alert('easyui')">easyui</a>  

    Bind click handler using jQuery.

     
    1. <a id="btn" href="#" class="easyui-linkbutton" data-options="iconCls:'icon-search'">easyui</a>  
     
    1. $(function(){   
    2.     $('#btn').bind('click'function(){   
    3.         alert('easyui');   
    4.     });   
    5. });  

     

    属性

    属性名属性值类型描述默认值
    id string 组件的ID属性。 null
    disabled boolean 为true时禁用按钮。 false
    plain boolean 为true时显示简洁效果。 false
    text string 按钮文字。 ''
    iconCls string 显示在按钮文字左侧的图标(16x16)的CSS类ID。 null
    iconAlign string 按钮图标位置。可用值有:'left','right'。(该属性自1.3.2版开始可用) left

     

    方法

    方法名方法参数描述
    options none 返回属性对象。
    disable none 禁用按钮。 

    代码示例:

    $('#btn').linkbutton('disable');
    
    enable none 启用按钮。 

    代码示例:

    $('#btn').linkbutton('enable');
    
  • 相关阅读:
    数据结构:关于重建二叉树的三种思路
    操作系统:进程调度算法详解之FCFS和SPF篇
    Java反射机制浅析
    数据挖掘:基于TF-IDF算法的数据集选取优化
    RC隔离 更新where条件列 没有索引的情况
    RR区间锁 不是唯一索引,即使区间内没值,也锁
    If one session has a shared or exclusive lock on record R in an index, another session cannot insert
    RR模式下利用区间锁防止幻读,RC模式没有区间锁会出现幻读
    使用next-key locks 用于搜索和索引扫描,可以防止幻读
    Gap Locks 区间锁
  • 原文地址:https://www.cnblogs.com/dotnetmvc/p/3635461.html
Copyright © 2011-2022 走看看