给easyui datebox扩展一个清空的实例,借鉴http://www.cnblogs.com/baiyangyuanzi/p/6625377.html
来源:互联网 发布:做长微博的软件 编辑:程序博客网 时间:2024/06/01 07:50
步骤一:拓展插件
/** * 给时间框控件扩展一个清除的按钮 */$.fn.datebox.defaults.cleanText = '清空';下面这一段加入easyui-lang-zh_CN.js中,任意位置!
var buttons = $.extend([], $.fn.datebox.defaults.buttons); buttons.splice(1, 0, { text: function (target) { return $(target).datebox("options").cleanText }, handler: function (target) { $(target).datebox("setValue", ""); $(target).datebox("hidePanel"); } }); $.extend($.fn.datebox.defaults, { buttons: buttons });步骤二:如果需要将清空按钮汉化,在easyui-lang-zh_CN.js中添加如下代码
if ($.fn.datebox){ $.fn.datebox.defaults.currentText = '今天'; $.fn.datebox.defaults.closeText = '关闭'; $.fn.datebox.defaults.cleanText = '清空'; $.fn.datebox.defaults.okText = '确定'; $.fn.datebox.defaults.missingMessage = '该输入项为必输项';
然后在jsp中这样写
<input id="b" class="easyui-datebox" style="width:135px" data-options="buttons:buttons">
阅读全文
0 0
- 给easyui datebox扩展一个清空的实例,借鉴http://www.cnblogs.com/baiyangyuanzi/p/6625377.html
- 给EasyUI的DateBox控件增加一个清空按钮
- CSS3 讲box布局很好的一个帖子 http://www.cnblogs.com/jr1993/p/4751410.html
- 给easyui的datebox控件添加清空按钮
- http://www.cnblogs.com/flylovesky/p/3274869.html
- http://www.cnblogs.com/ada-zheng/p/3284660.html
- http://www.cnblogs.com/zhanghaiba/p/3548602.html
- http://www.cnblogs.com/scy251147/p/3566638.html
- http://www.cnblogs.com/amosli/p/3577645.html
- http://www.cnblogs.com/VisualImage/p/3594973.html
- http://www.cnblogs.com/kuangbin/p/3164106.html
- http://www.cnblogs.com/wengzilin/p/3530712.html
- http://www.cnblogs.com/qingjoin/p/3549325.html
- http://www.cnblogs.com/interdrp/p/3785164.html
- http://www.cnblogs.com/ruiati/p/3930732.html
- http://www.cnblogs.com/knowledgesea/p/3491214.html
- http://www.cnblogs.com/ganganloveu/p/3755191.html
- http://www.cnblogs.com/kenshincui/p/3885689.html
- Linux开发--mmap映射/dev/mem内存
- css在ie7中overflow:hidden失效的解决方法
- 彻底搞懂 RxJava — 基础篇
- 1019 逆序数
- 有趣的数
- 给easyui datebox扩展一个清空的实例,借鉴http://www.cnblogs.com/baiyangyuanzi/p/6625377.html
- Slyar Home » C语言 单引号和双引号的区别
- CAS单点登录服务端与客户端配置
- 机器学习模型-外卖订单量预测异常报警模型实践
- ROM、SDRAM、RAM、DRAM、SRAM、FLASH的区别
- 比较两个Integer的值是否相等
- Nginx+FastCGI运行原理
- Apple for semantic-ui
- datagridview导出到Excel