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>
HTMLASPJavaScript

Avatar of undefined
Last Comment
Whing Dela Cruz
ASKER CERTIFIED SOLUTION
Avatar of Nitin Sontakke
Nitin Sontakke
Flag of India image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Where is txtHint? Why did you change element Ids in two statements?
SOLUTION
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
SOLUTION
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
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!
JavaScript
JavaScript

JavaScript is a dynamic, object-based language commonly used for client-side scripting in web browsers. Recently, server side JavaScript frameworks have also emerged. JavaScript runs on nearly every operating system and in almost every mainstream web browser.

127K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo