Link to home
Start Free TrialLog in
Avatar of Whing Dela Cruz
Whing Dela CruzFlag for Anguilla

asked on

Adding 1 the value of input "text" every 3 seconds

Hi experts, I want to make a function that would change the value of a certain input text, adding 1 in every 3 seconds. Please help.

<!Doctype Html>
<Html>
<Body>
<form>
<input type="text" id="iCount" value="0"/>
</form>

<script>
//I want here to add 1 the value of iCount every 3 seconds
var x = document.getElementById("iCount").value;
document.getElementById("txtHint").value = "" 
</script>

</Body>
</Html>
ASKER CERTIFIED SOLUTION
Avatar of Nitin Sontakke
Nitin Sontakke
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Where is txtHint? Why did you change element Ids in two statements?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Whing Dela Cruz

ASKER

Thanks a lot both of guys, all codes are helpful to my project. More power to all of you!