|
-
Aug 13th, 2002, 04:41 AM
#1
Thread Starter
Hyperactive Member
plus 1 every one second
I want to add 1 to value of Input every one second:
I use this code but it does not work right. What is the error ?
<form name=tt>
<input type=text name=number value=1>
</form>
<SCRIPT language="JavaScript">
function Clock()
{
NO=tt.number.value+1;
tt.number.value=NO
}
ID=setTimeout("Clock()",1000)
</SCRIPT>
-
Aug 13th, 2002, 10:26 AM
#2
Hyperactive Member
hello prokhaled
try this
tested in ie6.0 only
Code:
<html>
<head>
<SCRIPT language="JavaScript">
function clock()
{
document.tt.nu.value++
setTimeout("clock()",1000)
}
</SCRIPT>
</head>
<body onload="clock()">
<form name=tt>
<input type=text name=nu value=0>
</form>
</body>
</html>
bsw2112
-
Aug 13th, 2002, 12:19 PM
#3
Thread Starter
Hyperactive Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|