<SCRIPT LANGUAGE="JavaScript">
<!--
function appendZero(n){return ("00"+ n).substr(("00"+ n).length-2);}
function mm(strd)
{
var d = new Date(strd.replace(/-/g, "\/"));
var s = d.getFullYear();
s += appendZero(d.getMonth()+1);
s += appendZero(d.getDate());
s += appendZero(d.getHours());
s += appendZero(d.getMinutes());
s += appendZero(d.getSeconds());
return s
}
alert(mm("2004-12-1 10:00:28"));
alert(mm("2004-8-24"));
//-->
</SCRIPT>
<!--
function appendZero(n){return ("00"+ n).substr(("00"+ n).length-2);}
function mm(strd)
{
var d = new Date(strd.replace(/-/g, "\/"));
var s = d.getFullYear();
s += appendZero(d.getMonth()+1);
s += appendZero(d.getDate());
s += appendZero(d.getHours());
s += appendZero(d.getMinutes());
s += appendZero(d.getSeconds());
return s
}
alert(mm("2004-12-1 10:00:28"));
alert(mm("2004-8-24"));
//-->
</SCRIPT>
<%
tt=now()
att=mm(tt)%>
</body>错误:Microsoft VBScript 运行时错误 错误 '800a000d'
类型不匹配: 'mm'
<SCRIPT LANGUAGE="JavaScript">
你用的是什么??
asp呀