Json

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>javascript


<div>姓名:<span id="jname"></span></div>
<div>年齡: <span id="jage"></span></div>
<div>地址: <span id="jstreet"></span></div>
<div>電話: <span id="jphone"></span></div>
<div>說說: <span id="jshuo"></span></div>html


</body>java

<script type="text/javascript">
var str="我叫李文文";
var JSONObject= {
"name":"某某",
"street":"撫琴小區",
"age":20,
"phone":"1234567",
"shuo":strspa

};
document.getElementById("jname").innerHTML=JSONObject.name;
document.getElementById("jage").innerHTML=JSONObject.age;
document.getElementById("jstreet").innerHTML=JSONObject.street;
document.getElementById("jphone").innerHTML=JSONObject.phone;
document.getElementById("jshuo").innerHTML=JSONObject.shuo;htm

</script>ip

</html>get

相關文章
相關標籤/搜索