公共方法:
jQuery.myPlugin = {//為全局函數創建另一個命名空間; changeTime:function (time, type = "YYYY/MM/DD HH:mm") { return moment(time * 1000).format(type) } }
使用:
$.myPlugin.changeTime(1604073600, 'YYYY-MM-DD')
公共方法:
jQuery.myPlugin = {//為全局函數創建另一個命名空間; changeTime:function (time, type = "YYYY/MM/DD HH:mm") { return moment(time * 1000).format(type) } }
使用:
$.myPlugin.changeTime(1604073600, 'YYYY-MM-DD')
本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。