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');
    
  • 相关阅读:
    JDBC07-----代码重构之封装DBCUtils工具类
    JDBC06-----数据库连接池与配置文件
    JDBC05----事务与批处理
    JDBC04----预编译语句介绍
    JDBC03----DAO思想
    数据的序列化,持久化,归档
    苹果官方的图标大小的调整
    UIColletionView 的属性与常用方法介绍
    IOS学习笔记25—HTTP操作之ASIHTTPRequest
    IOS UI segmentedControl UISegmentedControl 常见属性和用法
  • 原文地址:https://www.cnblogs.com/dotnetmvc/p/3635461.html
Copyright © 2011-2022 走看看