zoukankan
html css js c++ java
js 每个月有多少天算法
function
change_date ()
{
var
month
=
document.getElementById('start_month');
var
month_temp
=
month.value.split('月');
var
year
=
document.getElementById('start_year') ;
var
year_temp
=
year.value.split('年');
var
date ;
if
(month_temp[
0
]
==
'
1
'
||
month_temp[
0
]
==
'
3
'
||
month_temp[
0
]
==
'
5
'
||
month_temp[
0
]
==
"
7
"
||
month_temp[
0
]
==
"
8
"
||
month_temp[
0
]
==
"
10
"
||
month_temp[
0
]
==
"
12
"
)
{ date
=
31
;
}
if
(month_temp[
0
]
==
'
4
'
||
month_temp[
0
]
==
'
6
'
||
month_temp[
0
]
==
'
9
'
||
month_temp[
0
]
==
'
11
' )
{
date
=
30
;
}
//
window.alert (month_temp[0]);
if
(month_temp[
0
]
==
'
2
' )
{
if
(year_temp[
0
]
%
100
==
0
)
{
if
(year_temp[
0
]
%
400
==
0
)
{
date
=
29
;
}
else
{
date
=
28
;
}
}
else
{
if
(((year_temp[
0
]
%
100
)
%
4
)
==
0
)
{
date
=
29
;
}
else
{
date
=
28
;
}
}
}
var
temp_date
=
document.getElementById('start_day');
for
(i
=
1
;i
<
date;i
++
)
{
var
add_date
=
document.createElement(
"
OPTION
"
);
add_date.text
=
i
+
'日';
add_date.value
=
i
+
'日';
temp_date.add(add_date);
}
}
查看全文
相关阅读:
字节跳动在 Go 网络库上的实践
TCP报文段的首部格式 20字节的固定首部
网易公开课 文件描述符 索引
网易新闻App架构重构实践:DDD正走向流行
货 | 携程是如何做AB实验分流的
Pusher Channels Protocol | Pusher docs https://pusher.com/docs/channels/library_auth_reference/pusher-websockets-protocol
避免重复提交?分布式服务的幂等性设计! 架构文摘 今天 点击蓝色“架构文摘”关注我哟 加个“星标”,每天上午 09:25,干货推送! 来源:https://www.cnblogs.com/QG-whz/p/10372458.html 作者:melonstreet
前置时间(Lead Time),也称前置期、备货周期
滴滴业务研发的精益实践
DevOps运动的缘起 将DevOps想象为一种编程语言里面的一个接口,而SRE类实现了这个接口
原文地址:https://www.cnblogs.com/gwazy/p/126331.html
最新文章
is_callable Callbacks / Callables What is a “callable”? 可调用 回调函数
Why failover-based implementations are not enough Redis分布式锁实现 SET resource_name my_random_value NX PX 30000
415 Unsupported Media Type
房产基于Swoole的PHP RPC框架设计
secure hashes message digests 安全哈希 消息摘要
为了更好的多线程性能,在对象创建或者更新时,若数据大于2047字节则 Python 的 GIL 会被释放。 执行计算密集型任务如压缩或哈希时释放 GIL
You shouldn't use *any* general-purpose hash function for user passwords, not BLAKE2, and not MD5, SHA-1, SHA-256, or SHA-3
美团配送A/B评估体系建设与实践
get uuid
终止轮询
热门文章
Salt (cryptography)
@functools.lru_cache()
自定义敏感配置项目
客户端必须在它发送到服务器的所有帧中添加掩码(Mask)
Supporting Multiple Versions of WebSocket Protocol 支持多版本WebSocket协议
all header field names in both HTTP requests and HTTP responses are case-insensitive.
结束握手
It is thread-safe and idempotent, but not reentrant.
Connection Pool
WebSocket TCP HTTP
Copyright © 2011-2022 走看看