<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
<meta charset="utf-8" />
<script src="jquery-1.4a2.min.js"></script>
</head>
<body>
<div id="a1"></div>
<script>
var jsons = "{\"comments\":[{\"content\":\"很不错嘛\",\"id\":1,\"nickname\":\"纳尼\"},{\"content\":\"哟西哟西\",\"id\":2,\"nickname\":\"小强\"}]}";
var j1 = JSON.parse(jsons);
$.each(j1.comments, function (i,item) {
$("#a1").append(item.id + "*" + item.nickname + "*" + item.content+"<br/>");
});
</script>
</body>
</html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
<meta charset="utf-8" />
<script src="jquery-1.4a2.min.js"></script>
</head>
<body>
<div id="a1"></div>
<script>
var jsons = "{\"comments\":[{\"content\":\"很不错嘛\",\"id\":1,\"nickname\":\"纳尼\"},{\"content\":\"哟西哟西\",\"id\":2,\"nickname\":\"小强\"}]}";
var j1 = JSON.parse(jsons);
$.each(j1.comments, function (i,item) {
$("#a1").append(item.id + "*" + item.nickname + "*" + item.content+"<br/>");
});
</script>
</body>
</html>