I need to have an input
box in a div
without a form and when the user enters something and hits return, it should run a Javascript function.
There will be no submit button.
How can I do this?
Yes, you can have a valid input without a form.
The consensus seems to be that FORM tags are no longer required when you simply want to render a form input control. If all your input field is doing is providing a UI (user interface) hook for interactions, then you can put the input fields into the HTML without including a FORM tag.
No you don't.
To get an input box without a form, I would suggest just not using a form.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With