|
|
|
ใช้ JavaScript วนลูป JSON String เพื่อ get ค่า key, value |
|
|
|
|
|
|
|
jQuery.parseJSON แล้วท่านจะพบทางสว่าง
|
|
|
|
|
Date :
2013-09-12 00:41:01 |
By :
PlaKriM |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Code (jQuery)
<script type="text/javascript">
$(document).ready(function(){
var obj = jQuery.parseJSON('<?=$str;?>');
$.each(obj, function(key, val) {
$("#div1").append(key +' = '+ val +'<br />');
});
});
</script>
|
|
|
|
|
Date :
2013-09-12 05:47:43 |
By :
mr.win |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 00
|