日期:2014-05-16 浏览次数:20361 次
<html> <body> <div id= "divID" style= "display:inline"> 测试 </div> <input type=button value= "显示" onclick='document.getElementById("divID").style.display="inline"'> <input type=button value= "隐藏" onclick='document.getElementById("divID").style.display="none"'> </body> </html>
<html> <body> <div id= "divID" style= "display:block"> 测试 </div> <input type=button value= "显示" onclick='document.getElementById("divID").style.display="block"'> <input type=button value= "隐藏" onclick='document.getElementById("divID").style.display="none"'> </body> </html>