<script>
//定义一个中文数组
var arr= new Array("星期日","星期一","星期二","星期三","星期四","星期五","星期六");
var myDate = new Date();
var cycle = arr[myDate.getDay()];
alert(cycle);
</script>
使用js中的数组简洁化
Js 中文显示星期几方法
最新推荐文章于 2024-07-15 22:00:00 发布