0
How do you gather input from input tags in HTML using JavaScript?
2 Answers
+ 3
use the value attribute
document.getElementBYId("inputIdName").value
https://code.sololearn.com/W9hoxIY3U6OX/?ref=app
0
By using :
document.querySelector('put your id name here ').value;
for example
const username = document.querySelector('#username');
alert(username.value);