W3School TIY Editor
W3School 在线教程
改变方向
暗黑模式
运行代码
<!DOCTYPE html> <html> <body> <h3>演示如何访问 BLOCKQUOTE 元素</h3> <p>Here is a quote from WWF's website:</p> <blockquote id="myBlockquote" cite="http://www.worldwildlife.org/who/index.html"> For 50 years, WWF has been protecting the future of nature. </blockquote> <p>请点击按钮来获得引用的 URL。</p> <p id="demo"></p> <button onclick="myFunction()">试一下</button> <script> function myFunction() { var x = document.getElementById("myBlockquote").cite; document.getElementById("demo").innerHTML = x; } </script> </body> </html>