Extjs中给button添加悬浮提示

<html>
<head>


<title>tabPanel Testtitle>

<linkrel="stylesheet"type="text/css"href="extjs/resources/css/ext-all.css"/>
<scriptsrc="extjs/resources/ext-all.js">script>
<scriptsrc="extjs/resources/ext-lang-zh_CN.js">script>
head>

<body>
<scripttype="text/javascript">

Ext.onReady(function(){
Ext.QuickTips.init();


Ext.create('Ext.button.Button', {
text : 'btn_tooltip',
scope : this,
icon:'resources/images/confirm.png',
tooltip :'we could see the tooltip for this button',
handler : function() {
alert('this is a button')
},
renderTo : Ext.getBody()
});


});
script>
body>
html>

效果图如下:

你可能感兴趣的:(Extjs中给button添加悬浮提示)