Rumah >pembangunan bahagian belakang >tutorial php >PHP生成数组再传给js的方法_PHP
<script type="text/javascript"> var slist = '<?php echo urlencode(json_encode($data['arr']));?>'; var list = eval(decodeURIComponent(slist)); drawGpsMap(list); </script>