CopyCode The Code is as follows: <SCRIPT type = "text/JavaScript">
Function initarray (){
This. Length = initarray. Arguments. length;
For (VAR I = 0; I <this. length; I ++ ){
This [I] = initarray. Arguments [I];
}
}
VaR stra = "";
Function timelist ()
{
VaR I = 0;
VaR STR = new array ("zero", "one", "two", "three", "Si", "Wu", "Lu", "wife ", "success", "fail ");
VaR str2 = new array ("1", "2", "3", "4", "5", "6", "7", "8 ", "9", "10 ");
VaR str3 = new array ("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday ");
VaR time = new date ();
VaR year = new initarray (time. getfullyear (). tostring (). split ("") [0], time. getfullyear (). tostring (). split ("") [1], time. getfullyear (). tostring (). split ("") [2], time. getfullyear (). tostring (). split ("") [3]);
// Var year = eval (time. getfullyear (). tostring ());
VaR month;
If (time. getmonth (). tostring (). length> 1)
{
Month = new initarray (time. getmonth (). tostring (). split ("") [0], time. getmonth (). tostring (). split ("") [1]);
}
Else
{
Month = new initarray (time. getmonth (). tostring (). Split ("") [0]);
}
VaR Len = year. length;
For (I = 0; I <4; I ++) // year
{
VaR K = parseint (year [I]);
Stra + = STR [k];
}
Stra + = "year ";
VaR J = 0;
VaR strb = "";
If (month. length> 1)
{
Strb + = str2 [9];
Strb + = str2 [parseint (time. getmonth (). tostring (). Split ("") [1])];
}
Else
{
Strb + = str2 [parseint (time. getmonth (). tostring (). Split ("") [0])];
}
Stra + = strb;
Stra + = "month ";
VaR strd = "";
If (time. getdate (). tostring (). length> 1)
{
If (parseint (time. getdate (). tostring (). Split ("") [0])> 1)
{
Strd + = str2 [parseint (time. getdate (). tostring (). Split ("") [0])-1];
Strd + = str2 [9];
If (parseint (time. getdate (). tostring (). Split ("") [1])> 0)
{
Strd + = str2 [parseint (time. getdate (). tostring (). Split ("") [1])-1];
}
Else
{
Strd + = "";
}
}
Else
{
If (parseint (time. getdate (). tostring (). Split ("") [1]) = 0)
{
Strd + = "";
Strd + = str2 [9];
}
Else
{
Strd + = str2 [9];
Strd + = str2 [parseint (time. getdate (). tostring (). Split ("") [1])-1];
}
}
}
Else
{
Strd + = "";
Strd + = str2 [parseint (time. getdate (). tostring (). Split ("") [0])-1];
}
Stra + = strd;
Stra + = "";
VaR sta = time. getday ();
Stra + = str3 [sta];
Document. getelementbyid ("text1"). value = stra;
Document. getelementbyid ("textbox1"). innertext = stra;
Document. All. label1.innertext = stra;
Document. form1.textbox2. innertext = stra;
}
</SCRIPT>