x
1
<p>你可以使用点号(.)来访问 JSON 对象的值:</p>
2
3
<p id="demo"></p>
4
5
<script>
6
var myObj, x;
7
myObj = {
8
"name": "mifengjc",
9
"alexa": 10000,
10
"site": null
11
};
12
x = myObj.name;
13
document.getElementById("demo").innerHTML = x;
14
</script>