<br /><script type="text/javascript"><br /> $(function(){<br /> $.post('index.php',{}, function(data){<br /> var data = eval('(' + data + ')'); //对返回值进行转化<br /> for(var key in data){<br /> console.log(data[key]);//第一层数组<br /> for(var i in data[key]){<br /> console.log(data[key][i]);第二层<br /> }<br /> }<br /> });<br /> });<br /><br /></script><br />
返回来的json进行解析,再for循环
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn