2012-02-22 11 views

答えて

0

使用JSON.stringify({ここにあなたのオブジェクト})

0

JSON.stringify(jsonObject)はjsonObjectが文字列に変換し、あなたを与えるだろう。最新のブラウザーでネイティブに利用できます。下位互換性を保つために、JSON-js

0
**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']; 
関連する問題