W3School TIY Editor
W3School 在线教程
改变方向
暗黑模式
运行代码
<!DOCTYPE html> <html> <body> <h3>演示如何创建 BLOCKQUOTE 元素</h3> <p>请点击按钮来创建 BLOCKQUOTE 元素,此引用的来源是 worldwildlife.org。</p> <button onclick="myFunction()">试一下</button> <script> function myFunction() { var x = document.createElement("BLOCKQUOTE"); var t = document.createTextNode("For 50 years, WWF has been protecting the future of nature."); x.setAttribute("cite", "http://www.worldwildlife.org/who/index.html"); x.appendChild(t); document.body.appendChild(x); } </script> </body> </html>