0

How to get input in my website

Is there any way to store the input given by user from <input> tags and use the input in JS.

17th Jun 2021, 9:57 AM
Charan
Charan - avatar
2 Respostas
+ 1
<input class="random" ..... onchange="storeval()" /> Storeval =()=>{ var inputvalue = document.querySelector(".random").value ; ///do something with inputval }
17th Jun 2021, 1:40 PM
Divya Mohan
Divya Mohan - avatar
+ 4
Hi! You can store user input in js variable
17th Jun 2021, 12:31 PM
Yaroslav Vernigora
Yaroslav Vernigora - avatar