Easy | 您所在的位置:网站首页 › gg1000调时间最简单方法 › Easy |
Easy-UI中datebox的默认显示当前日期的最简单的两种方法
本文仅为自己日常记录积累,不作任何他用!
本文完全引用至:
https://www.cnblogs.com/hmxin/archive/2018/06/04/9133414.html
感谢原博主:黑幕下的人
在中有一个Today按钮就是实现显示当前日期,所以我们在src/jquery.datebox.js文件中可以找到currentText:‘Today’。 所以我们可以使用’currentText’和’Today’来默认显示当前日期。 1.使用属性data-options="value:‘currentText’"或data-options=“value:‘Today’” 2.使用javascript设置KaTeX parse error: Expected 'EOF', got '#' at position 3: ('#̲datebox1').date…(’#datebox1’).datebox(‘setValue’,‘currentText’); ------------------------------------题外话------------------------------------ Easy-UI使用一般需要引入2个css文件和2个js文件即可,文件名如下: 最后,如果想要datebox显示的是中文,那么请在jquery.easyui.min.js引入locale/easyui-lang-zh_CN.js即可。 提醒:使用easy-UI框架,javascript出现"Uncaught TypeError: Cannot read property ‘options’ of undefined" /xxx/jquery-easyui-1.5.5/jquery.easyui.min.js (15933)报错时,有可能是你写的javascript代码没有放在window.οnlοad=function(){}或$(function(){})之中。 |
CopyRight 2018-2019 实验室设备网 版权所有 |