我不想说:
<script type="text/javascript">
var today = new Date();
document.write(today + "<br />");
//document.write(today.length + "<br />"); - was getting "undefined"
//document.write(today[0] + "<br />"); - was getting "undefined"
document.write(today.getMonth + "<br />");
document.write(today.getMonth + "<br />");
document.write(today.getFullYear + "<br />");
</script>
产出:
Fri Jan 13 14:13:01 EST 2012
function getMonth() { [native code] }
function getDay() { [native code] }
function getFullYear() { [native code] }
我想要的是现在的月、日、年,把它变成一个我稍后能够呼吁的阵列。 我不会因为这一本土法典而变得遥远。 谁能告诉我,现在和希望,更重要的是,我能够完成这一项目? 感谢你的时间和帮助!