- 1

How do I read what's in an input box?

I'm trying to read what goes in these boxes https://code.sololearn.com/WieLsY81YbGM/?ref=app

5th Jul 2020, 6:30 PM
TheCoolTroy
5 Respuestas
+ 1
it might take some event to take input ex- in input tag write oninput=" getval()" in script tag use this function getval(){ var aval = document.querySelector("#A1").value ; document.write(aval) ; }; now as soon as you input a value in input box it will show you value
6th Jul 2020, 10:12 AM
Divya Mohan
Divya Mohan - avatar
0
What do you want as a output? And in your code line 36 is wrong in html section, it should be : var A1 = document.getElementById("A1");
5th Jul 2020, 6:47 PM
Omkar Kamat
Omkar Kamat - avatar
0
var box1Answer = parseInt(Math.random()*9)
6th Jul 2020, 4:33 PM
Sali65
Sali65 - avatar
0
TheCoolTroy i just told you
7th Jul 2020, 1:31 AM
Sali65
Sali65 - avatar
- 2
As my output I want what was typed into one of the boxes
5th Jul 2020, 7:14 PM
TheCoolTroy