chen106106 发表于 2013-1-24 07:10:48

自己写的一个简单的jquery 日期插件

写日期插件主要的2个问题:
 
1。计算某个月有多少天,2012.9月到底有多少天呢?
 
(new Date(+(new Date(2012, 7, 1)) - 24×60×60×1000)).getDate(); 
2、知道了当月有多少天还不行,要知道当月1号是要放在什么位置
 
<div class="container" style="margin: 0px !important; padding: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-left-radius: 0px !important; background-image: none !important; border: 0px !important; float: none !important; height: auto !important; line-height: 2em !important; overflow: visible !important; vertical-align: baseline !important; width: auto !important;"><div class="line number1 index0 alt2" style="margin: 0px !important; padding: 0px 5px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-left-radius: 0px !important; background-image: none !important; background-color: #f8f8f8 !important; border: 0px !important; float: none !important; height: auto !important; line-height: 2em !important; overflow: visible !important; vertical-align: baseline !important; width: auto !important;">new Date(2012, 7,1).getDay();
页: [1]
查看完整版本: 自己写的一个简单的jquery 日期插件