<html>
<body>
<p>单击按钮可创建一个 BLOCKQUOTE 元素,其中包含指向 worldwildlife.org 的链接作为引用的来源。</p>
<button onclick="myFunction()">试一试</button>
<script>
function myFunction() {
var x = document.createElement("BLOCKQUOTE");
var t = document.createTextNode("50 年来,WWF 一直致力于保护自然的未来。");
x.setAttribute("cite", "http://www.worldwildlife.org/who/index.html");
x.appendChild(t);
document.body.appendChild(x);
}
</script>
</body>
</html>