我想在html中实现显示当前日期的功能,应该怎么做?

如题所述

第1个回答  2008-08-29
代码:
<script
language=JavaScript>
today=new
Date();
document.write(
"<
color=#000000
style='font-size:9pt;font-family:
宋体'>你好,今天是
",
today.getYear(),"年",
today.getMonth()+1,"月",
today.getDate(),"日",
"
欢迎你的到来</font>"
);
</script>
直接考到你要放置的地方,就可以了,字体的格式在color和style里改。
相似回答