-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
55 lines (48 loc) · 1.57 KB
/
Copy pathindex.html
File metadata and controls
55 lines (48 loc) · 1.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>07 Object - JavaScript Development Lab</title>
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<main class="page">
<header class="hero">
<p class="eyebrow">JavaScript Development Lab · 07</p>
<h1>Object</h1>
<p class="lead">通过一个真实产品对象,理解属性、嵌套对象、数组属性和对象方法。</p>
</header>
<section class="panel">
<h2>产品基本信息</h2>
<div id="product-card" class="product-card"></div>
</section>
<section class="panel">
<h2>对象属性读取</h2>
<div id="property-result" class="result"></div>
</section>
<section class="panel">
<h2>嵌套对象</h2>
<div id="spec-result" class="result"></div>
</section>
<section class="panel">
<h2>数组属性</h2>
<div id="color-result" class="result"></div>
</section>
<section class="panel">
<h2>对象方法</h2>
<div id="method-result" class="result"></div>
</section>
<section class="panel note">
<h2>建议修改实验</h2>
<ol>
<li>修改产品名称或价格,观察页面变化。</li>
<li>给 <code>specs</code> 增加新的规格属性。</li>
<li>给 <code>colors</code> 增加新的颜色。</li>
<li>新增一个对象方法,返回自定义描述。</li>
</ol>
</section>
</main>
<script src="js/app.js" defer></script>
</body>
</html>