onsubmit=“return false” has no effect on Internet Explorer 7/8 (form is still submitted)

后端 未结 14 2002
耶瑟儿~
耶瑟儿~ 2020-12-11 04:03

I have a form that will be submitted by javascript code triggered in \"onsubmit\" of the tag. Works fine on all browsers - but not on IE7/IE8.

What can I do?

<
14条回答
  •  Happy的楠姐
    2020-12-11 04:33

    I think that the problem is in return false you need to return it from your 'onsubmit' function

    see example.

    This form will never be submitted in IE 7/8 as well.

     

    Danny.

提交回复
热议问题