将php数组或者对象传递给js

来源:互联网 发布:美工做好图怎么上传 编辑:程序博客网 时间:2024/05/21 00:00
<script>
var arr = <?php echo json_encode($arr)?>; 
</script>
0 0