Javascript插入时间的问题
下面的代码是表示时间的。但是有一个FORM。我在NETSCAPE里看时,时有一个框的。但是在IE里没有。如何能将这个框去掉?
我想这个时间这样显示,
Die Statistiken wurden am Mittwoch, den 17. Juli 2002 um 15:10:30 zuletzt aktualisiert。
也就是说在时间的前面加Die Statistiken wurden am, 日期的前面加den时间的前面加um。如何加?
多谢指教!
<body ... onload="startclock();">
...
<script language="JavaScript">
var timerID = null
var timerRunning = false
function MakeArray(size)
{
this.length = size;
for(var i = 1; i <= size; i++)
{
this[i] = "";
}
return this;
}
function stopclock (){
if(timerRunning)
clearTimeout(timerID);
timerRunning = false
}
function showtime () {
var now = new Date();
var year = now.getYear();
var month = now.getMonth() + 1;
var date = now.getDate();
var hours = now.getHours();
var minutes = now.getMinutes();
var seconds = now.getSeconds();
var day = now.getDay();
Day = new MakeArray(7);
Day[0]="Sonntag";
Day[1]="Montag";
Day[2]="Dienstag";
Day[3]="Mittwoch";
Day[4]="Donnerstag";
Day[5]="Freitag";
Day[6]="Samstag";
var timeValue = "";
timeValue += (Day[day]) + ", ";
timeValue += date + ".";
timeValue += month + "." + year + " ";
timeValue += ((hours <= 12) ? hours : hours);
timeValue += ((minutes < 10) ? ":0" : ":") + minutes;
timeValue += ((seconds < 10) ? ":0" : ":") + seconds;
// timeValue += (hours < 12) ? " Guten Morgen" : " Guten Tag";
document.jsfrm.face.value = timeValue;
timerID = setTimeout("showtime()",1000);
timerRunning = true
}
function startclock () {
stopclock();
showtime()
}
</script>
<div align="left">
<table width="95%">
<tr>
<td align="left" width="33%" bordercolor="#FFFFFF" bordercolorlight="#FFFFFF" bordercolordark="#FFFFFF"><form name="jsfrm">
<p align="left"><input type="text" size="34" name="face" style="font-family: Arial; border-style: solid; border-color: #FFFFFF">
</p>
</form>
</td>
</tr>
</table>
</div>