IE10 find first button on page and trigger click event on input submit

与世无争的帅哥 提交于 2019-12-01 03:40:10

another solution

define your buttons type as button. because default type is submit

<button type="button" ....

Well, IE10 for Windows7 is a pre-release, and this seems to be one of the things MS should fix. Anyway, I don't know why this happens, but I've found a workaround for the problem:

Instead of button, use <input type="button">.

Live demo at jsFiddle.

I was having the same problem. Adding type="button" to all my buttons worked. <button type="button">...

Even though my buttons are not in a form.

From other testing I've done IE 10 works exactly like Chrome. This is the only exception I've seen.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!