0

How can connect html to js in form method

<input type="text"name="user name"> To js

15th Nov 2019, 12:57 PM
Mohammed Awel Ibrahim
Mohammed Awel Ibrahim - avatar
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
15th Nov 2019, 12:59 PM
Ipang
+ 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.
15th Nov 2019, 1:13 PM
🇮🇳Omkar🕉
🇮🇳Omkar🕉 - avatar