[javascript] div z-index 바꾸기 스크립트
로빈아빠
본문
function z_index(num)
{
var tg_01 = document.getElementById("div_01");
var tg_02 = document.getElementById("div_02");
if(tg_01 && tg_02){
if(num == 1){
tg_01.style.zIndex = "100";
tg_02.style.zIndex = "10";
}else{
tg_01.style.zIndex = "10";
tg_02.style.zIndex = "100";
}
}
}
{
var tg_01 = document.getElementById("div_01");
var tg_02 = document.getElementById("div_02");
if(tg_01 && tg_02){
if(num == 1){
tg_01.style.zIndex = "100";
tg_02.style.zIndex = "10";
}else{
tg_01.style.zIndex = "10";
tg_02.style.zIndex = "100";
}
}
}
관련링크
댓글목록
등록된 댓글이 없습니다.