extjs学习

extjs的官方网站

http://www.sencha.com/products/js/

Eclipse 的 JS 编辑工具 IDE Spket 应用

java -jar spket-1.6.11.jar

 

perferences

下的 

:spket 下的 ExtJs

ext.jsb

 

myeclipse 快捷键 提示 content Assist

 

以下是实际项目中的ext的部分代码

 

对时间类型的转换

if(Ext.util.Format){ 
Ext.util.Format.date = function(v, format){ 
if(!v) return ""; 
if(!(v instanceof Date)) v = new Date(Date.parse(v)); 
return v.dateFormat(format || "y年m月d日"); 
}; 
} 

 

简单的日期选择类

if(Ext.DatePicker){ 
Ext.apply(Ext.DatePicker.prototype, { 
todayText : "今天", 
minText : "日期在最小日期之前", 
maxText : "日期在最大日期之后", 
disabledDaysText : "", 
disabledDatesText : "", 
monthNames : Date.monthNames, 
dayNames : Date.dayNames, 
nextText : '下月 (Control+Right)', 
prevText : '上月 (Control+Left)', 
monthYearText : '选择一个月 (Control+Up/Down 来改变年)', 
todayTip : "{0} (空格键选择)", 
format : "y年m月d日", 
okText : "确定", 
cancelText : "取消" 
 }); 
} 

 

分页:

if(Ext.PagingToolbar){ 
Ext.apply(Ext.PagingToolbar.prototype, { 
beforePageText : "页", 
afterPageText : "页共 {0} 页", 
firstText : "第一页", 
prevText : "前一页", 
nextText : "下一页", 
lastText : "最后页", 
refreshText : "刷新", 
displayMsg : "显示 {0} - {1},共 {2} 条", 
emptyMsg : '没有数据需要显示' 
}); 
} 

 

if(Ext.form.TextField){ 
Ext.apply(Ext.form.TextField.prototype, { 
minLengthText : "该输入项的最小长度是 {0}", 
maxLengthText : "该输入项的最大长度是 {0}", 
blankText : "该输入项为必输项", 
regexText : "", 
emptyText : null 
}); 
} 

if(Ext.form.NumberField){ 
Ext.apply(Ext.form.NumberField.prototype, { 
minText : "该输入项的最小值是 {0}", 
maxText : "该输入项的最大值是 {0}", 
nanText : "{0} 不是有效数值" 
}); 
} 

if(Ext.form.DateField){ 
Ext.apply(Ext.form.DateField.prototype, { 
disabledDaysText : "禁用", 
disabledDatesText : "禁用", 
minText : "该输入项的日期必须在 {0} 之后", 
maxText : "该输入项的日期必须在 {0} 之前", 
invalidText : "{0} 是无效的日期 - 必须符合格式: {1}", 
format : "y年m月d日" 
}); 
} 

if(Ext.form.ComboBox){ 
Ext.apply(Ext.form.ComboBox.prototype, { 
loadingText : "加载...", 
valueNotFoundText : undefined 
}); 
} 


提供一个简单的、易于扩展的、可重写的表单验证功能。
if(Ext.form.VTypes){ 
Ext.apply(Ext.form.VTypes, { 
emailText : '该输入项必须是电子邮件地址,格式如: "user@domain.com"', 
urlText : '该输入项必须是URL地址,格式如: "http:/'+'/www.domain.com"', 
alphaText : '该输入项只能包含字符和_', 
alphanumText : '该输入项只能包含字符,数字和_' 
}); 
} 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值