+ 1

How do I get an HTML input into JavaScript?

Example: <input id="name"> I need to do some operations with input #name in JavaScript so I need to transfer it into JS My English is bad, so if you don't understand what I'm talking about, I'll try to explain by another way.

10th Nov 2019, 7:09 PM
Antonio 👑
Antonio 👑 - avatar
2 Respostas
+ 2
var inp = document.getElementById(“name”);
10th Nov 2019, 7:16 PM
Ginfio
Ginfio - avatar
+ 4
I think getDoucmentById method helps you
10th Nov 2019, 7:12 PM
Sumit Programmer😎😎
Sumit Programmer😎😎 - avatar