案例:javascript案例     状态:可编辑再运行    进入竖版
 运行结果 
x
 
1
<!DOCTYPE html>
2
<html>
3
<body>
4
5
<h3>演示如何访问 BLOCKQUOTE 元素</h3>
6
7
<p>Here is a quote from WWF's website:</p>
8
9
<blockquote id="myBlockquote" cite="http://www.worldwildlife.org/who/index.html">
10
For 50 years, WWF has been protecting the future of nature.
11
</blockquote>
12
13
<p>请点击按钮来获得引用的 URL。</p>
14
15
<p id="demo"></p>
16
17
<button onclick="myFunction()">试一下</button>
18
19
<script>
20
function myFunction()
21
{
22
var x = document.getElementById("myBlockquote").cite;
23
document.getElementById("demo").innerHTML = x;
24
}
25
</script>
26
27
</body>
28
</html>
29