如何解析JSON对象与js的字符串
答
使用JSON.stringify({你的对象这里})
答
**Check this out it will be helpful**
//index.php
<script type="text/javascript">
$(document).ready(function(){
var json1 = {"test1":"TEST1","test2":"TEST2","test3":"TEST3","test4":"TEST4"};
str = "data="+JSON.stringify(json1);
$.get('test.php',decodeURI(str),function(html){ alert(html); },"html");
});
</script>
//test.php
echo $GET['data'];