开发者

CSS Button Problem with Enter Key

开发者 https://www.devze.com 2023-03-06 09:20 出处:网络
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.

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消