묻고답하기
page_full_width" class="col-xs-12" |cond="$__Context->page_full_width">
vbscript를 자바스크립트로 바꾸고 싶은데 이거 같은 경우는 어떻게 하나요?
2006.04.08 18:57
vbscript를 자바스크립트로 바꾸고 싶은데 이거 같은 경우는 어떻게 하나요?
z-index 예제입니다.
===============================================================================================
<html>
<head><title>z-index 예제</title>
<SCRIPT LANGUAGE="VBScript">
<!--
Sub Window_OnLoad()
doAnim(2)
End Sub
Sub doAnim(dir)
select case dir
case 2
document.all("QMark").style.pixelLeft=document.all("QMark").style.pixelLeft + 2
if document.all("QMark").style.pixelLeft >=275 then
str=self.setTimeout("doAnim(1)",10)
else
str=self.setTimeout("doAnim(2)",10)
end if
case 1
document.all("QMark").style.pixelLeft=document.all("QMark").style.pixelLeft - 2
if document.all("QMark").style.pixelLeft <=0 then
str=self.setTimeout("doAnim(2)",10)
else
str=self.setTimeout("doAnim(1)",10)
end if
end select
end sub
-->
</SCRIPT>
</head>
<DIV BACKGROUND="#ffffe0" ID="LayerTesting" STYLE="position:relative;WIDTH:250pt;HEIGHT:55pt;background-color:#FFFFE0;border-style:solid;border-width:1px">
<SPAN STYLE="container:positioned;position:absolute;TOP:5pt;LEFT:8pt;WIDTH:65pt;HEIGHT:27pt;Z-INDEX:6;font:bold italic 24pt Arial;color:#CCCCCC" ID="What">What</SPAN>
<SPAN STYLE="container:positioned;position:absolute;TOP:5pt;LEFT:68pt;WIDTH:45pt;HEIGHT:25pt;Z-INDEX:4;font:bold italic 24pt Arial;color:#999999">do</SPAN>
<SPAN STYLE="container:positioned;position:absolute;TOP:5pt;LEFT:104pt;WIDTH:50pt;HEIGHT:33pt;Z-INDEX:7;font:bold italic 24pt Arial;color:#CCCCCC">you</SPAN>
<SPAN STYLE="container:positioned;position:absolute;TOP:5pt;LEFT:151pt;WIDTH:65pt;HEIGHT:25pt;Z-INDEX:3;font:bold italic 24pt Arial;color:#999999">want</SPAN>
<SPAN STYLE="container:positioned;position:absolute;TOP:5pt;LEFT:210pt;WIDTH:33pt;HEIGHT:25pt;Z-INDEX:8;font:bold italic 24pt Arial;color:#CCCCCC" ID="To">to</SPAN>
<SPAN STYLE="container:positioned;position:absolute;TOP:0;LEFT:0;WIDTH:10;HEIGHT:56;Z-INDEX:5;font:bold italic 48pt Arial;color:blue" ID="QMark">?</SPAN>
<SPAN STYLE="container:positioned;position:absolute;TOP:21pt;LEFT:55pt;WIDTH:74pt;HEIGHT:25pt;Z-INDEX:4;font:bold italic 24pt Arial;color:#999999">know</SPAN>
<SPAN STYLE="container:positioned;position:absolute;TOP:21pt;LEFT:125pt;WIDTH:75pt;HEIGHT:33pt;Z-INDEX:9;font:bold italic 24pt Arial;color:#CCCCCC">today</SPAN>
</DIV><br>
물음표 z-index조절 메뉴<br>
<input type=button onclick="javascript:document.all['QMark'].style.zIndex=15;" value="z-index 가장 늦게">
<input type=button onclick="javascript:document.all['QMark'].style.zIndex=5;" value="z-index 섞어서">
<input type=button onclick="javascript:document.all['QMark'].style.zIndex=1;" value="z-index 가장 처음으로">
<br><br>
</body>
</html>
z-index 예제입니다.
===============================================================================================
<html>
<head><title>z-index 예제</title>
<SCRIPT LANGUAGE="VBScript">
<!--
Sub Window_OnLoad()
doAnim(2)
End Sub
Sub doAnim(dir)
select case dir
case 2
document.all("QMark").style.pixelLeft=document.all("QMark").style.pixelLeft + 2
if document.all("QMark").style.pixelLeft >=275 then
str=self.setTimeout("doAnim(1)",10)
else
str=self.setTimeout("doAnim(2)",10)
end if
case 1
document.all("QMark").style.pixelLeft=document.all("QMark").style.pixelLeft - 2
if document.all("QMark").style.pixelLeft <=0 then
str=self.setTimeout("doAnim(2)",10)
else
str=self.setTimeout("doAnim(1)",10)
end if
end select
end sub
-->
</SCRIPT>
</head>
<DIV BACKGROUND="#ffffe0" ID="LayerTesting" STYLE="position:relative;WIDTH:250pt;HEIGHT:55pt;background-color:#FFFFE0;border-style:solid;border-width:1px">
<SPAN STYLE="container:positioned;position:absolute;TOP:5pt;LEFT:8pt;WIDTH:65pt;HEIGHT:27pt;Z-INDEX:6;font:bold italic 24pt Arial;color:#CCCCCC" ID="What">What</SPAN>
<SPAN STYLE="container:positioned;position:absolute;TOP:5pt;LEFT:68pt;WIDTH:45pt;HEIGHT:25pt;Z-INDEX:4;font:bold italic 24pt Arial;color:#999999">do</SPAN>
<SPAN STYLE="container:positioned;position:absolute;TOP:5pt;LEFT:104pt;WIDTH:50pt;HEIGHT:33pt;Z-INDEX:7;font:bold italic 24pt Arial;color:#CCCCCC">you</SPAN>
<SPAN STYLE="container:positioned;position:absolute;TOP:5pt;LEFT:151pt;WIDTH:65pt;HEIGHT:25pt;Z-INDEX:3;font:bold italic 24pt Arial;color:#999999">want</SPAN>
<SPAN STYLE="container:positioned;position:absolute;TOP:5pt;LEFT:210pt;WIDTH:33pt;HEIGHT:25pt;Z-INDEX:8;font:bold italic 24pt Arial;color:#CCCCCC" ID="To">to</SPAN>
<SPAN STYLE="container:positioned;position:absolute;TOP:0;LEFT:0;WIDTH:10;HEIGHT:56;Z-INDEX:5;font:bold italic 48pt Arial;color:blue" ID="QMark">?</SPAN>
<SPAN STYLE="container:positioned;position:absolute;TOP:21pt;LEFT:55pt;WIDTH:74pt;HEIGHT:25pt;Z-INDEX:4;font:bold italic 24pt Arial;color:#999999">know</SPAN>
<SPAN STYLE="container:positioned;position:absolute;TOP:21pt;LEFT:125pt;WIDTH:75pt;HEIGHT:33pt;Z-INDEX:9;font:bold italic 24pt Arial;color:#CCCCCC">today</SPAN>
</DIV><br>
물음표 z-index조절 메뉴<br>
<input type=button onclick="javascript:document.all['QMark'].style.zIndex=15;" value="z-index 가장 늦게">
<input type=button onclick="javascript:document.all['QMark'].style.zIndex=5;" value="z-index 섞어서">
<input type=button onclick="javascript:document.all['QMark'].style.zIndex=1;" value="z-index 가장 처음으로">
<br><br>
</body>
</html>