WTF did i do wrong when creating this script!!!!
thanks!!! i am trying to make an online clock...i left the stuff above my code ou cause i know the problem isnt there... is there a debugger for JScript????
<FORM NAME = "Tick">
<INPUT TYPE = "Text" SIZE = "12" NAME = "Clock">
</FORM>
<SCRIPT LANGUAGE = "JavaScript1.2">
function time()
{
var hand = new Date()
var hours = hand.gethours()
var minutes = hand.getminutes()
var seconds = hand.getseconds()
var dn = "AM"
if (hours>12)
{
dn = "PM"
hours = hours-12
}
if (hours == 0)
hours = 12
if (minutes<=9)
minutes = "0"+minutes
if (seconds<=9)
seconds = "0"+seconds
document.tick.clock.value = hours+ ":" +minutes+ ":" +seconds+ " " dn
setTimeout = ("show()", 1000)
show()
}
</SCRIPT>
</HTML>
thanks!!! i am trying to make an online clock...i left the stuff above my code ou cause i know the problem isnt there... is there a debugger for JScript????
<FORM NAME = "Tick">
<INPUT TYPE = "Text" SIZE = "12" NAME = "Clock">
</FORM>
<SCRIPT LANGUAGE = "JavaScript1.2">
function time()
{
var hand = new Date()
var hours = hand.gethours()
var minutes = hand.getminutes()
var seconds = hand.getseconds()
var dn = "AM"
if (hours>12)
{
dn = "PM"
hours = hours-12
}
if (hours == 0)
hours = 12
if (minutes<=9)
minutes = "0"+minutes
if (seconds<=9)
seconds = "0"+seconds
document.tick.clock.value = hours+ ":" +minutes+ ":" +seconds+ " " dn
setTimeout = ("show()", 1000)
show()
}
</SCRIPT>
</HTML>
Comment