答案 0 :(得分:3)
您可以通过右键单击页面并查看来源轻松查看此内容:
<script type="text/javascript">
<!--
// Array of day names
var dayNames = new Array("Sunday","Monday","Tuesday","Wednesday",
"Thursday","Friday","Saturday");
var now = new Date();
document.write("Happy " + dayNames[now.getDay()] + ".");
// -->
</script>
答案 1 :(得分:1)
他们可能会使用PHP来获得这样的一天
<?php
date_default_timezone_set("Europe/London");
$day = date("l");
echo "Happy " . $day;
?>