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 onCl开发者_C百科ick="document.getElementById('form').submit();"><div id="loginButton" type="submit">LOGIN</div></a>
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.
精彩评论