星期一, 12月 05, 2011

[Javascript] Characters to escape in JSON

 $("#exec").click(function(){
  var newPW = $("#newPW").val();
  console.log("old newPW:" + newPW);
  var testPW = 
  {
    test:newPW
  }
  //escape special charactors
  console.log("JSON.stringify:" + JSON.stringify(testPW));
 });
Reference:
Characters to escape in JSON

沒有留言:

張貼留言

留個話吧:)

其他你感興趣的文章

Related Posts with Thumbnails