Home  >  Article  >  Web Front-end  >  浅谈jQuery.easyui的datebox格式化时间_jquery

浅谈jQuery.easyui的datebox格式化时间_jquery

WBOY
WBOYOriginal
2016-05-16 15:52:481373browse

方法很简单,这里就不多废话了,直接奉上代码:

 $.fn.datebox.defaults.formatter = function (date) {
    var y = date.getFullYear();
    var m = date.getMonth() + 1;
    var d = date.getDate();
    return y + '/' + (m < 10 &#63; ('0' + m) : m) + '/' + (d < 10 &#63; ('0' + d) : d);
  }

以上所述就是本文的全部内容了,希望能够对小伙伴们学习jQuery有所帮助。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn