方法一:
today=new Date();
form1.test.value=today.getYear()+'年'+today.getMonth()+'月'+today.getDay()+'日';
方法二:
---------------------------------------------------------------
方法三:
---------------------------------------------------------------
function time_rota() //写当前日期的函数
{
var now = new Date();
var h = now.getFullYear();
var m = (now.getMonth() + 1>9) ? now.getMonth() + 1 : "0"+(now.getMonth() + 1);
var s = (now.getDate()>9) ? now.getDate() : "0"+now.getDate();
document.form1.Today.value = h+"年"+m+"月"+s+"日";
}
//-->