TypeError: e[h] is not a function

后端 未结 6 1028
说谎
说谎 2020-12-28 18:20

I\'ve been using jquery 1.6 with no problem. Today I switched to jquery 1.8 and suddenly I am getting this error when trying to submit a form:

TypeError: e[h         


        
6条回答
  •  醉酒成梦
    2020-12-28 18:43

    When we use a submit type element in a form, This element will be set as Submit property of the form. So one could not call the submit() function with other element of form.

    There are two ways to do this. first one is just remove the line as given in first reply.

    Or Use $("#submit").trigger("click"); instead of $("#login").submit();. and it will submit the form on pressing enter key word too.

提交回复
热议问题