JS 弹DIV

<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>

你可能感兴趣的:(JS 弹DIV)