<head> <title>演示get方法的使用</title> <script language=javascript> <!-- function WeekDay(d){ var d,day,x,s=","; var x=new Array("星期日","星期一","星期二"); var x=x.concat("星期三","星期四","星期五"); var x=x.concat("星期六"); day=d.getDay(); return(s+=x[day]); } function GetDataAll(d){ var s="今天是:"; s+=d.getYear()+"-"; s+=(d.getMonth()+1)+"-"; s+=d.getData(); return(s); } funtion GetTimeAll(d){ var s=",本地时间为"; var c=":"; s+=d.getHours()+c; s+=d.getMinutes()+c; s+=d.getSeconds(); return(s); } //main var D=new Data(); alter(GetDataAll(D)+WeekDay(D)+GetTimeAll(D)); //main end //--> </script> </head>