0
How to get Html user input form and use it in javascript code / set it as a variable
please when you get it is it going to be a number or string please help You can help with this code https://code.sololearn.com/Wu1WWPd10G9a/?ref=app
5 Answers
+ 2
Here's ur answer, hope u like it : https://code.sololearn.com/W3M24FNZ9ybk/?ref=app
+ 1
Use this:
<input type="number" id="inp" >
Var userInput=document.getElementById("inp").value
also in line 9 of html use spaces between tag name and attribute
+ 1
Thanks so much ones again
0
you need to add a submit button, and then add an event listener to extract the value of input when you submit.