帝国cms之用js显示当前日期,下面直接上代码:
日期
<script language="JavaScript" class="unnamed1">
var enabled = 0;
today = new Date();
var day;
var date;
if (today.getDay() == 0) day = "星期日"
if (today.getDay() == 1) day = "星期一"
if (today.getDay() == 2) day = "星期二"
if (today.getDay() == 3) day = "星期三"
if (today.getDay() == 4) day = "星期四"
if (today.getDay() == 5) day = "星期五"
if (today.getDay() == 6) day = "星期六"date = (today.getYear()) + "年" + (today.getMonth() + 1) + "月" + today.getDate() + "日";
document.write("<span style="font – size: 12px;
" >");
document.write(date);
document.write(" ");
document.write(day);
document.write("</span>");
</script>
标签: CMS网站, day, getDay, today, var
上面是“帝国CMS之用js显示当前日期”的全面内容,想了解更多关于 帝国cms 内容,请继续关注web建站教程。
当前网址:https://m.ipkd.cn/webs_1120.html
声明:本站提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请发送到邮箱:admin@ipkd.cn,我们会在看到邮件的第一时间内为您处理!