event.preventDefault() working in Chrome, not Firefox for a submit button

后端 未结 5 1023
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-18 06:11

I have the following submit button:

 

When I use the follo

5条回答
  •  无人及你
    2021-01-18 06:42

    Simply in the function onclick for the submit button write down like this

    onclick="return myfunction();"
    

    and inside the function statements

    myfunction () {
    return false;};
    

提交回复
热议问题