编辑下面的代码:【加编码】
<html> <body> <details id="myDetails"> <summary>Copyright 1999-2014.</summary> <p> - by Refsnes Data. All Rights Reserved.</p> <p>All content and graphics on this web site are the property of the company Refsnes Data.</p> </details> <p>点击按钮来显示或隐藏描述信息。 <b>注意:</b>您也可以点击文本“Copyright 1999-2014.”上的内容来切换隐藏与显示。</p> <button onclick="openDetails()">显示描述信息</button> <button onclick="closeDetails()">隐藏描述信息</button> <script> function openDetails() { document.getElementById("myDetails").open=true; } function closeDetails() { document.getElementById("myDetails").open=false; } </script> </body> </html>
结果: 【此窗口】 帮助?
Try it Yourself - © 自强学堂