<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>无标题文档</title><script type="text/jscript">function hidetext(){var clo=confirm("真的要的隐藏吗?");if (clo = true){ document.getElementById("con").style.display="none" ; } else{ alert("关闭吧!"); } }function showtext(){ var open=confirm("要显示咯"); if (open = true){ document.getElementById("con").style.display="block"; } else{ alert("那就算了吧"); }}</script></head><body><h1>这是要练习显示和隐藏</h1><p id="con">八户山倒数第皇帝使得撒的是大皇帝和撒旦会死的</p><input type="button" value="这是要隐藏" onclick="hidetext()" /><input type="button" value="这是要显示" onclick="showtext()" /></body></html>
添加回答
举报
0/150
提交
取消