Search the Community
Showing results for tags 'input value'.
-
Hi all, I'm newbie here. I would like to create a number input field for logged in user to update their daily number of chanting. There will be a number input field, update button, total number of chanting (updated number will sum total automatically) and last is total number of chanting for all users. I was no idea to get the solution on the function, so I was here to ask for proS to help me on this
- 2 replies
-
- input value
- input field
-
(and 1 more)
Tagged with:
-
I do not get the input value x to add to i in the for loop. What am I doing wrong? <!DOCTYPE html> <html> <body> <input id="inp" type="number" > </input> <button type="button" onclick=myFunction() > click</button> <p id="result" > </p> <script> function myFunction(){ var txt= ""; res = document.getElementById("result"); res.innerHTML=""; var x= document.getElementById("inp").value; var i= 0; for ( ; i < 20; i++) { txt += "input" + i + "<br>"; i = i += x ; } res.innerHTML=txt; console.log(txt += "input is " + (i+x) + "<br>"); console.log(i); } </script> </body> </html>
- 3 replies
-
- java script
- input value
-
(and 1 more)
Tagged with: