How can I use JSON-like variables in my function like this?
$ Ajax ({type: "post", -> data: {this_var: this_value}});
Use JSON.stringify () to create JSON objects.
$ Ajax ({Type: "POST", url: url Action, Datatype: "Jason", Content Type: "Application / Jason", Data: JSON.stringify ({variable1: value1, variable2: value2})});
No comments:
Post a Comment