依照星期顯示不同訊息
- Internet Explorer 6.0
- Internet Explorer 7.0
- Internet Explorer 8.0
- Mozilla Firefox 2.0
- Mozilla Firefox 3.0
- Google Chrome
- Safari 3.1
- Opera 9.5
- 依照星期顯示不同訊息 - 依照不同的星期顯示不同的訊息。
- 語法總長度:496 字元
<script type="text/javascript"><!--
now = new Date();
if (now.getDay() == 5) document.write("星期五的訊息");
if (now.getDay() == 6) document.write("星期六的訊息");
if (now.getDay() == 0) document.write("星期日的訊息");
if (now.getDay() == 1) document.write("星期一的訊息");
if (now.getDay() == 2) document.write("星期二的訊息");
if (now.getDay() == 3) document.write("星期三的訊息");
if (now.getDay() == 4) document.write("星期四的訊息");
// --></script>