Reputation: 143
I made login page with CSS submit button, the problem is I have to click the button (using mouse) and can't use enter key to process my page.
This is my code:
<a onClick="document.getElementById('form').submit();"><div id="loginButton" type="submit">LOGIN</div></a>
Upvotes: 2
Views: 559
Reputation: 490233
Use a normal submit or button[type="submit"]
.
The latter you can style to look like anything.
Then you don't need to use JavaScript at all.
Upvotes: 3