jquery:-[object Object] error

后端 未结 4 1004
难免孤独
难免孤独 2021-01-11 10:44

i have a validation.js file

var name = $(\"#name\");

    $.ajax({
        type:       \"get\",
        url:        \"test.jsp\",
        data:           \"n         


        
4条回答
  •  感动是毒
    2021-01-11 11:33

    The good-old IE expects to redirect somewhere when you use an anchor tag. If you have something like the following:

    Submit
    

    IE will show you blank page with [Object object] when using JSON, even if submit() uses ajax.

    You can use onClick instead or javascript:void sumbit() like this:

    Submit
    
    

    I didn't test the void solution but a coworker of mine says that's the one he uses.

提交回复
热议问题