AJAX call works in Chrome and Safari but not in Firefox and IE?

后端 未结 2 1963
悲&欢浪女
悲&欢浪女 2020-12-12 05:13

This is my code to reset a user\'s password incase the user forgets his password. The data is sent to the PHP code via AJAX requests and the PHP code simply echoes a \"Y\" o

2条回答
  •  醉话见心
    2020-12-12 05:50

    You have to use an event object for the parameter of the event handler, chrome and safari has a global event object called event when an event is triggered but firefox does not. So event.preventDefault(); will cause an error.

    E.g.

    $('#email_send').click(function(event) {
    

提交回复
热议问题