html

레이어 창 띄우기 소스

SojuMan 2009. 10. 28. 16:42

<script>

 function showLayer() {
  var layer = document.all.layerpopup;
  layer.style.left = 10;
  layer.style.top  = 20;
  layer.style.visibility = 'visible';
 }

 function hideLayer() {
  var layer = document.all.layerpopup;
  layer.style.left = 0;
  layer.style.top = 0;
  layer.style.visibility = 'hidden';
 }
</script>


<a href="javascript:showLayer();">창보기</a>

<!-- Layer PopUp 창 -->         
<table border="0" cellpadding="1" cellspacing="0" bgcolor="#EFEFEF"
id="layerpopup" style="position: absolute; width: 200; left: 0px; top: 0px; z-index: 1; visibility: hidden;">
<tr>
 <td>ddd</td>
</tr>
<tr>
 <td><a href="javascript:hideLayer();" title="닫기">Close</a></td>
</tr>
</table>