怎么给控件加上tips提示 在Extjs中怎么给控件加上tips提示,就是鼠标放上去就有tips提示。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 Ext.onReady(function(){ Ext.QuickTips.init(); Ext.form.Field.prototype.msgTarget = 'qtip';//这2个是提示信息的设置项{ fieldLabel: 'First Name', name: 'first', allowBlank:false} Ext.onReady(function(){ Ext.QuickTips.init(); Ext.form.Field.prototype.msgTarget = 'qtip';//这2个是提示信息的设置项 new Ext.ToolTip({//ToolTip这个就是提示控件,刚才上面的是验证用的 target: 'tip1', html: 'this is tip' });}<div id="tip1"></div> 我是给控件加个tips提示功能,不是添加验证提示 Ext.onReady(function(){ Ext.QuickTips.init(); Ext.form.Field.prototype.msgTarget = 'qtip';//这2个是提示信息的设置项 new Ext.ToolTip({//ToolTip这个就是提示控件,刚才上面的是验证用的 target: 'tip1',//要给的控件id html: 'this is tip' });} <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html> <head> <title>extPanel.html</title> <meta http-equiv="keywords" content="keyword1,keyword2,keyword3"> <meta http-equiv="description" content="this is my page"> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <link rel="stylesheet" type="text/css" href="ext-2.2/resources/css/ext-all.css" /> <script type="text/javascript" src="ext-2.2/adapter/ext/ext-base.js"></script> <script type="text/javascript" src="ext-2.2/ext-all.js"></script> <script type="text/javascript"> Ext.onReady(function () { Ext.QuickTips.init(); Ext.form.Field.prototype.msgTarget = 'qtip';//这2个是提示信息的设置项 var P = Ext.extend(Ext.Panel, { renderTo: Ext.getBody(), title: "panel", width: 200, height: 200, closable : true, autoScroll : true, layout : "fit", maskDisabled : false, buttons: [new Ext.Button({text: "button", tooltip: "this is my Panel"})], gridViewConfig : { animate : true } }); new P(); }); </script> </head> <body> This is my HTML page. <br> </body></html> 那个target后面可以写控件名吗?指定是哪个控件。 我可以动态给target指定值吗,先new,然后setTarget之类的方法??? 一个jquery问题 [Shane原创] JavaScript 面向对象编程,严格过程的标准化编程法,目前为止最好的 JS 生成对象代码结构 jquery easyui 的messager alert使用问题? 关于IFRAME的引用或设置问题,请教大家 frame中表单提交的问题 JavaScript正则表达式 为什么我网站首页的flash要刷新2次才能读取出来? 如何消除换行赋值给js变量呢 我想在进入一个窗体后再把本窗体的工具栏等去掉,该怎么做? javascript 能否取得服务器的时间?? javascript 正则替换DIV标签 JS拖放DIV如何只允许在这个范围内的呢
Ext.onReady(function(){
Ext.QuickTips.init();
Ext.form.Field.prototype.msgTarget = 'qtip';//这2个是提示信息的设置项
{
fieldLabel: 'First Name',
name: 'first',
allowBlank:false
}
Ext.onReady(function(){
Ext.QuickTips.init();
Ext.form.Field.prototype.msgTarget = 'qtip';//这2个是提示信息的设置项 new Ext.ToolTip({//ToolTip这个就是提示控件,刚才上面的是验证用的
target: 'tip1',
html: 'this is tip'
});
}
<div id="tip1"></div>
Ext.onReady(function(){
Ext.QuickTips.init();
Ext.form.Field.prototype.msgTarget = 'qtip';//这2个是提示信息的设置项 new Ext.ToolTip({//ToolTip这个就是提示控件,刚才上面的是验证用的
target: 'tip1',//要给的控件id
html: 'this is tip'
});
}
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>extPanel.html</title>
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="this is my page">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="ext-2.2/resources/css/ext-all.css" />
<script type="text/javascript" src="ext-2.2/adapter/ext/ext-base.js"></script> <script type="text/javascript" src="ext-2.2/ext-all.js"></script>
<script type="text/javascript">
Ext.onReady(function () {
Ext.QuickTips.init();
Ext.form.Field.prototype.msgTarget = 'qtip';//这2个是提示信息的设置项
var P = Ext.extend(Ext.Panel, {
renderTo: Ext.getBody(),
title: "panel",
width: 200,
height: 200,
closable : true,
autoScroll : true,
layout : "fit",
maskDisabled : false,
buttons: [new Ext.Button({text: "button", tooltip: "this is my Panel"})],
gridViewConfig : {
animate : true
}
});
new P();
});
</script> </head>
<body>
This is my HTML page. <br>
</body>
</html>