form action with javascript

后端 未结 4 1272
半阙折子戏
半阙折子戏 2020-12-05 02:12

I have a form that must execute a javascript function on submit, the function then posts data to my php send mail file and the mail is sent. But it only works in fire fox. T

4条回答
  •  暖寄归人
    2020-12-05 03:07

    I always include the js files in the head of the html document and them in the action just call the javascript function. Something like this:

    action="javascript:checkout()"
    

    You try this?

    Don't forget include the script reference in the html head.

    I don't know cause of that works in firefox. Regards.

提交回复
热议问题