JS 弹DIV

来源:互联网 发布:mac mysql 忘记密码 编辑:程序博客网 时间:2024/04/28 21:35

<html>
<head>
<title>LIGHTBOX EXAMPLE</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

</head>
<body>
 <input type="button" onclick="document.all.div.style.display=(document.all.div.style.display=='none')?'':'none'"  value="button" />
 
<div id="div" style="width: 300px; height:200px;border: 1px dashed #CCCCCC;background-color: #FFFFCC; display:none">this is a div!</div>
</body>
</html>