zoukankan      html  css  js  c++  java
  • ExtJS专题(十二)Tooltips与QuickTips的使用

    ExtJs是通过Ext.ToolTip和Ext.QuickTips两个组件来实现浮动提示功能的。

        

    QuickTips代码示例:只需要加入Ext.QuickTips.init(); 就可以在html页面中使用。html页面 可以通过: 

     .html代码 

     

    1. <input type="button" value="OK" ext:qtitle="Test" ext:qtip="Test Content!">  
    2. <a id=tip1 href="">wanglong</a>&nbsp;&nbsp;&nbsp;<a id=ajax-tip href="">ajaxtip</a>
    3. <a id='close-tip' href="">closetip</a>
    4. <a id=track-tip href="">tracktip</a>  

     

     

     

    .net代码 
    1. //实现浮动提示.  
    2. Ext.QuickTips.init();
    3.   //Test  ToolTip
    4. new Ext.ToolTip({        target: 'tip1',        html: 'test tooltip'    });
    5.  new Ext.ToolTip({        target: 'ajax-tip',         200,        autoLoad: { url: 'AjaxPage.aspx' }    });
    6. new Ext.ToolTip({        target: 'close-tip',        html: 'test close',        title: 'test',        autoHide: false,        closable: true,        draggable: true    });
    7. new Ext.ToolTip({        target: 'track-tip',        title: 'Mouse Track',         200,        html: 'This tip will follow the nouse while  it  is over the element',        trackMouse: true,        dismissDelay: 15000    });

     

     

     

     //实现浮动提示.
        Ext.QuickTips.init();
        //Test  ToolTip
        new Ext.ToolTip({
            target: 'tip1',
            html: 'test tooltip'
        });
        new Ext.ToolTip({
            target: 'ajax-tip',
             200,
            autoLoad: { url: 'AjaxPage.aspx' }
        });
        new Ext.ToolTip({
            target: 'close-tip',
            html: 'test close',
            title: 'test',
            autoHide: false,
            closable: true,
            draggable: true
        });
        new Ext.ToolTip({
            target: 'track-tip',
            title: 'Mouse Track',
             200,
            html: 'This tip will follow the nouse while  it  is over the element',
            trackMouse: true,
            dismissDelay: 15000
        });

     //实现浮动提示.    Ext.QuickTips.init();    //Test  ToolTip    new Ext.ToolTip({        target: 'tip1',        html: 'test tooltip'    });    new Ext.ToolTip({        target: 'ajax-tip',         200,        autoLoad: { url: 'AjaxPage.aspx' }    });    new Ext.ToolTip({        target: 'close-tip',        html: 'test close',        title: 'test',        autoHide: false,        closable: true,        draggable: true    });    new Ext.ToolTip({        target: 'track-tip',        title: 'Mouse Track',         200,        html: 'This tip will follow the nouse while  it  is over the element',        trackMouse: true,        dismissDelay: 15000    });

  • 相关阅读:
    程序写法
    2011年C++再次给力
    WIN7+LINUX双系统
    随机洗牌算法
    Eclipse快捷键大全
    Android 编程规范
    android Context 上下文的几点解析
    消息模式Toast.makeText的几种常见用法
    Eclipse的优化
    用PULL解析器解析XML文件
  • 原文地址:https://www.cnblogs.com/Leo_wl/p/1683988.html
Copyright © 2011-2022 走看看