点击按钮弹出div,留用

  <input type="button" onclick="document.getElementById('div').style.display=(document.getElementById('div').style.display=='none')?'':'none'"  value="button" />

<div id="div" style="width: 300px;border: 1px dashed #CCCCCC;background-color: #FFFFCC; display:none">this is a div!</div>

posted on 2013-11-12 22:23  荒荒9468  阅读(226)  评论(0编辑  收藏  举报