var box3 = (parseInt(prompt("请输入一个月份")))
if (box3 == 1 || box3 == 3 || box3 == 5 || box3 == 7 || box3 == 8 || box3 == 10 || box3 == 12) {
alert('这个月有31天')
} else if (box3 == 4 || box3 == 6 || box3 == 9 || box3 == 11) {
alert('这个月有30天')
} else if (box3 == 2) {
alert('这个月有28天')
} else {
alert('请输入正确的月份')
}
输入月份显示当月天数
原创
©著作权归作者所有:来自51CTO博客作者终究是雾散的原创作品,请联系作者获取转载授权,否则将追究法律责任
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
java获取当月最大日
java获取当月最大日
System java 字段