我已经尝试在我的 wordpress 帖子上使用 javascript 超过 2 小时了。我研究了所有要研究的东西,但它仍然不起作用。
我确保将我的代码粘贴到 wordpress 的“文本”选项卡中。
我能得到一些帮助吗?
这是我的代码:
<script language="Javascript">
<!--
// Array of day names
var dayNames = new Array("Sunday","Monday","Tuesday","Wednesday",
"Thursday","Friday","Saturday");
// Array of month Names
var monthNames = new Array(
"January","February","March","April","May","June","July",
"August","September","October","November","December");
var now = new Date();
document.write(dayNames[now.getDay()] + ", " +
monthNames[now.getMonth()] + " " +
now.getDate() + ", " + now.getFullYear());
// -->
</script>