Passing js object as json to jquery?

后端 未结 3 1480
闹比i
闹比i 2020-12-14 04:06

I have the following but it\'s not working, I read somewhere on the stackoverflow that it works like this but I can\'t seem to get it to work.. it errors... am I doing somet

3条回答
  •  盖世英雄少女心
    2020-12-14 04:32

    My suggestion would be to use the jquery-json plug-in and then you can just do this in your code:

    ...
    data: $.toJSON(saveData),
    ...
    

提交回复
热议问题