-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexp.html
59 lines (56 loc) · 2.02 KB
/
exp.html
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
56
57
58
59
<html>
<head>
<title>缩略语</title>
<!-- zhichengroup.github.io -->
<script>
function displayAbbreviations(){
// 1.======
var abbreviations = document.getElementsByTagName("abbr");
if(abbreviations.length<1){
return false;
}
// 2.======
var defs = new Array();
for(var i = 0;i<abbreviations.length;i++){
var definition = abbreviations[i].getAttribute("title");
var key = abbreviations[i].lastChild.nodeValue;
defs[key] = definition;
}
// 3.======
var dlist = document.createElement("dl");
for(key in defs){
var definition = defs[key];
var dtitle = document.createElement("dt");
var dtitle_text = document.createTextNode(key);
dtitle.appendChild(dtitle_text);
var ddesc = document.createElement("dd");
var ddesc_text = document.createTextNode(definition);
ddesc.appendChild(ddesc_text);
dlist.appendChild(dtitle);
dlist.appendChild(ddesc);
}
var header = document.createElement("h2");
var body_element = document.getElementsByTagName("body")[0];
var header_text = document.createTextNode("abbreviations");
header.appendChild(header_text);
body_element.appendChild(header);
body_element.appendChild(dlist);
}
window.onload = displayAbbreviations;
</script>
</head>
<body>
<h1>What is the Document 0bject Model?</h1>
<p>
The <abbr title="World Wide Web Consortium">W3C</abbr> defines the <abbr title="Document 0bject Model">DOM</abbr> as;
</p>
<blockquote cite="http://www.w3.org/DOM/">
<p>
A platform- and language-neutral interface that will allow programs and scripts to dynamically access and update the content,structure and style of documents.
</p>
<p>
It is an <abbr title="Application Programming Interface">API</abbr>that can be used to navigate <abbr title="HyperText Markup Languange">HTML</abbr> and <abbr title="eXtend Markup Language">XML</abbr> documents.
</p>
<!--by sss_zcg index-url=https://zhichengroup.github.io -->
</body>
</html>