0
How can connect html to js in form method
<input type="text"name="user name"> To js
2 Antworten
+ 3
Please put HTML and JavaScript in question tags, in place of 'pls'
For future reference, please follow this guide to posting a question 👍
https://www.sololearn.com/Discuss/333866/?ref=app
+ 2
Normally an onsubmit event works fine with form. If it's just an <input> tag with no <form> as parent I use onchange event.
try :
<input type="text" onchange="display(this)">
let diaplay=(inp)=>{
alert(inp.value);
};
try to do with this logic, if you fill difficulty search net for details and then also if you can't make it work ask here.