<html>
<head>
<meta name="vs_defaultClientScript" content="JavaScript">
<script>
function jsontest()
{
//json
var jsontext = '{"man":{"weight":"75kg","age":"24"},"ar":["1","2","3","4"]}';
//解析json
var aman = eval("("+jsontext+")");
//取出json中的信息
alert(aman.man.weight);
}
</script>
</head>
<body οnlοad="jsontest();">
</body>
</html>
转载于:https://www.cnblogs.com/frogbag/archive/2008/04/11/1148365.html