TestJSON = {
Test: function (eventId) {
var obj = new Object();
obj.Content = 'Hello<br>world.';
var data = $.toJSON(obj); //JSON.stringify(obj);
alert(data);
$.post(SvConstant.GetBaseUrl() + "/Services/PageHandler/TestJSON.aspx?type=TestJSON", { 'data': data }, TestJSON.Test_OnSuccess, "json");
},
Test_OnSuccess: function (cmdResult) {
...
} }
The code snippet above cannot post data to server because it contains
tag. How can I resolve this problem?
Try: