레이어 제어 함수 v2

<script LANGUAGE="javascript">
tl = null;
is_clicked = false;
function mymove(){
tl.style.pixelLeft=event.x+document.body.scrollLeft-10;
tl.style.pixelTop=event.y+document.body.scrollTop-10;
document.onmousedown=end
}
function start(lay){
 if(is_clicked == false)
 { 
  tl = document.getElementById(lay);
  is_clicked = true;
  document.onmousemove=mymove
 }else{
  is_clicked = false; 
  document.onmousedown=end
 }
}
function end(){
//tl = null;
 document.onmousemove=end
}
function lay_zindex(this_l)
{
 zindex2 = this_l.style.zIndex;
 lay_zindex_un_all(); 
 this_l.style.zIndex = zindex2 + 20000 ;
}
function lay_display(this_l)
{
 document.getElementById(this_l).style.display = 'none';
}
function lay_zindex_un_all()
{
 limit = <?=$cut_page?> ;
 for(i = 1; i <= limit ; i ++)
 {
  str = 'lay_'+i;
 lay_zindex_un(str);
 }
  for(i = 1; i <= 20 ; i ++)
 {
  str = 'lay_notice_'+i;
 lay_zindex_un(str);
 }
}
function lay_zindex_un(this_l2)
{
 
 if(document.getElementById(this_l2) != null)
 {
  this_l3 = document.getElementById(this_l2);
  zindex = this_l3.style.zIndex;
  if(zindex > 20000 )
  {
   this_l3.style.zIndex = zindex % 20000 ;
  }
 }
}
/*
function lay_center(this_l)
{
 tx = document.getElementById(this_l)
 var left_x = (screen.width - tx.style.width)/2;
    var top_y = (screen.height - tx.style.height)/3;
 tx.style.pixelLeft=left_x;
 tx.style.pixelTop=top_y;
}
*/
</script>
댓글
  • No Nickname
    No Comment
  • 권한이 없습니다.
    {{m_row.m_nick}}
    -
목록형 📷 갤러리형
제목
[기본형] HTML (with 부트스트랩5.3 , jquery 3.7, vue.js)
유용한 리눅스(LINUX) 명령어
[공지] 기술 게시판
4.28
4.29
4.30
5.1
5.2
5.3
5.4
5.5
5.6
5.7
5.8
5.9
5.11
5.12
5.13
5.14
5.15
5.16
5.17
5.18
5.19
5.20
5.21
5.22
5.23
5.24
5.25
5.26
5.27
5.28
5.29
5.30
5.31
6.1