Extjs msgTarget 提示位置

来源:互联网 发布:mac迅雷下载不了种子 编辑:程序博客网 时间:2024/05/19 05:41

文章转载于:Extjs msgTarget 提示位置  http://www.studyofnet.com/news/161.html

 

extjs msgTarget 有效值包括:

qtip:显示一个浮动的提示消息

title:显示一个浏览器浮动提示消息

under:在字段下面显示一个提示消息,使用under时要注意表单的高度

side:在字段右边显示一个提示消息,使用side是要注意表单的宽度

none:不显示提示消息

 

qtip,title,under,side形式的各个效果图

 

一个简单的实例:

 

Ext.onReady(function(){  Ext.QuickTips.init();// 初始化显示提示信息。没有它提示信息出不来。 var form = new Ext.form.FormPanel({  title:"提示信息(side)",  height:200,  width:300,  frame:true,  labelSeparator:":",  labelWidth:60,  labelAlign:"right",  items:[   new Ext.form.TextField({    fieldLabel : "姓名",    allowBlank:false,    blankText:"请输入名字",    msgTarget:"qtip"  //修改这里的值msgTarget:"title"  msgTarget:"under"  msgTarget:"side"   }),   new Ext.form.NumberField({    fieldLabel:"年龄",    allowBlank:false,    blankText:"请写年龄",    msgTarget:"qtip"   })  ] }); new Ext.Viewport({  title:"",  items:[form] });});