How to properly use <form> and <input>

So, I was trying to use <input /> inside a <form> </form>, and I was finding that when I hit enter (which I wanted to do something else), it was causing the whole program screen to go white. Could anyone give me some help with this?

Please provide code, where do you run this form?

1 Like

When you hit enter you are submitting the form. It makes the page reload if you do not specify form’s action (like POST for example). To avoid page reload, you need to use javascript - run this function on submit:

function(e) {
1 Like

Then nothing will happen, @poisonbee will need to provide more details about what he is attempting, and where he is attempting this

1 Like

I fixed it, and then gave up on the whole project alltogether. Thanks for
your help though.

P.S. This is what happens when you reply via e-mail with Avast installed:

why would you give up on the whole project? What where you trying to do that didn’t work?

1 Like

I was trying to create, in essence, a console, using HTML, for a project,
that, without something unique like that, would be generic and crappy.