编辑下面的代码:【加编码】
<html> <body> <p id="p1">这是一个文本。 这是一个文本。 这是一个文本。 这是一个文本。 这是一个文本。 这是一个文本。 这是一个文本。</p> <input type="button" value="隐藏文本" onclick="document.getElementById('p1').style.visibility='hidden'"> <input type="button" value="显示文本" onclick="document.getElementById('p1').style.visibility='visible'"> </body> </html>
结果: 【此窗口】 帮助?
Try it Yourself - © 自强学堂