<!---------------------------------------------------------------------------------------
▶ 기능: 클릭한 메뉴 고정하기
---------------------------------------------------------------------------------------->
<html>
<head>
<title>http://www.01code.com[ 클릭한 메뉴 고정하기 ]</title>
<meta http-equiv="content-type" content="text/html; charset=euc-kr">
<link rel=stylesheet href="http://www.01code.com/ydhtml/01code.css" type=text/css>
<script language=javascript>
<!--
var FixPoint = ""; //고정된 메뉴 초기화
var muNum = 3; //메인 메뉴 개수
var imgDir = "http://www.01code.com/webedition/images/"; //이미지 경로
if(document.images)
{
mu_1_0_on = new Image(); mu_1_0_on.src = imgDir + "mu_1_0_on.gif"; mu_1_0_off = new Image(); mu_1_0_off.src = imgDir + "mu_1_0_off.gif";
mu_2_0_on = new Image(); mu_2_0_on.src = imgDir + "mu_2_0_on.gif"; mu_2_0_off = new Image(); mu_2_0_off.src = imgDir + "mu_2_0_off.gif";
mu_3_0_on = new Image(); mu_3_0_on.src = imgDir + "mu_3_0_on.gif"; mu_3_0_off = new Image(); mu_3_0_off.src = imgDir + "mu_3_0_off.gif";
}
function ImgOn(imgName){
if(document.images) document[imgName].src = eval(imgName + "_on.src");
}
function ImgOff(imgName)
{
if(document.images) document[imgName].src = eval(imgName + "_off.src");
}
function SetInit()
{
SetFix('');
}
function SetFix(SetPoint)
{
if(SetPoint != ""){ FixPoint = SetPoint; }
for(i=1; i<=muNum; i++){
var imgName = "mu_" + i + "_0";
if(FixPoint == imgName){ ImgOn(imgName); }else{ ImgOff(imgName); }
}
}
//-->
</script>
</head>
<body onLoad="SetFix('mu_1_0')">
<h4>[ 클릭한 메뉴 고정하기 ]</h4>
<a href="#" onfocus=blur() onMouseOver="ImgOn('mu_1_0');" onMouseOut="SetInit();" onClick="SetFix('mu_1_0')"><img border=0 name="mu_1_0" src="http://www.01code.com/webedition/images/mu_1_0_off.gif"></a>
<a href="#" onfocus=blur() onMouseOver="ImgOn('mu_2_0');" onMouseOut="SetInit();" onClick="SetFix('mu_2_0')"><img border=0 name="mu_2_0" src="http://www.01code.com/webedition/images/mu_2_0_off.gif"></a>
<a href="#" onfocus=blur() onMouseOver="ImgOn('mu_3_0');" onMouseOut="SetInit();" onClick="SetFix('mu_3_0')"><img border=0 name="mu_3_0" src="http://www.01code.com/webedition/images/mu_3_0_off.gif"></a>
</body>
</html><div class='small'>[이 게시물은 관리자님에 의해 2011-10-31 16:57:14 JavaScript에서 이동 됨]</div>
▶ 기능: 클릭한 메뉴 고정하기
---------------------------------------------------------------------------------------->
<html>
<head>
<title>http://www.01code.com[ 클릭한 메뉴 고정하기 ]</title>
<meta http-equiv="content-type" content="text/html; charset=euc-kr">
<link rel=stylesheet href="http://www.01code.com/ydhtml/01code.css" type=text/css>
<script language=javascript>
<!--
var FixPoint = ""; //고정된 메뉴 초기화
var muNum = 3; //메인 메뉴 개수
var imgDir = "http://www.01code.com/webedition/images/"; //이미지 경로
if(document.images)
{
mu_1_0_on = new Image(); mu_1_0_on.src = imgDir + "mu_1_0_on.gif"; mu_1_0_off = new Image(); mu_1_0_off.src = imgDir + "mu_1_0_off.gif";
mu_2_0_on = new Image(); mu_2_0_on.src = imgDir + "mu_2_0_on.gif"; mu_2_0_off = new Image(); mu_2_0_off.src = imgDir + "mu_2_0_off.gif";
mu_3_0_on = new Image(); mu_3_0_on.src = imgDir + "mu_3_0_on.gif"; mu_3_0_off = new Image(); mu_3_0_off.src = imgDir + "mu_3_0_off.gif";
}
function ImgOn(imgName){
if(document.images) document[imgName].src = eval(imgName + "_on.src");
}
function ImgOff(imgName)
{
if(document.images) document[imgName].src = eval(imgName + "_off.src");
}
function SetInit()
{
SetFix('');
}
function SetFix(SetPoint)
{
if(SetPoint != ""){ FixPoint = SetPoint; }
for(i=1; i<=muNum; i++){
var imgName = "mu_" + i + "_0";
if(FixPoint == imgName){ ImgOn(imgName); }else{ ImgOff(imgName); }
}
}
//-->
</script>
</head>
<body onLoad="SetFix('mu_1_0')">
<h4>[ 클릭한 메뉴 고정하기 ]</h4>
<a href="#" onfocus=blur() onMouseOver="ImgOn('mu_1_0');" onMouseOut="SetInit();" onClick="SetFix('mu_1_0')"><img border=0 name="mu_1_0" src="http://www.01code.com/webedition/images/mu_1_0_off.gif"></a>
<a href="#" onfocus=blur() onMouseOver="ImgOn('mu_2_0');" onMouseOut="SetInit();" onClick="SetFix('mu_2_0')"><img border=0 name="mu_2_0" src="http://www.01code.com/webedition/images/mu_2_0_off.gif"></a>
<a href="#" onfocus=blur() onMouseOver="ImgOn('mu_3_0');" onMouseOut="SetInit();" onClick="SetFix('mu_3_0')"><img border=0 name="mu_3_0" src="http://www.01code.com/webedition/images/mu_3_0_off.gif"></a>
</body>
</html><div class='small'>[이 게시물은 관리자님에 의해 2011-10-31 16:57:14 JavaScript에서 이동 됨]</div>
댓글 1개
전쟁같은사랑
18년 전
질문요!!!
선택된 메뉴이미지를 두개 이상 보여주고자 할때는 어떻게 하나요?
짧게나마.. 바디에 로딩하는 이미지아이디를 하나더 추가하면 될꺼라 생각했는데.. 안되네요.
<body onLoad="SetFix('mu_1_0')"> <---------이 부분을
<body onLoad="SetFix('mu_1_0','mu_3_0')"> <---- 1번과 3번 이미지가 보여야 한다고 할때 이렇게 하면 된다고 생각했는데... 안되네요...
부탁드립니다... ㅠㅠ
선택된 메뉴이미지를 두개 이상 보여주고자 할때는 어떻게 하나요?
짧게나마.. 바디에 로딩하는 이미지아이디를 하나더 추가하면 될꺼라 생각했는데.. 안되네요.
<body onLoad="SetFix('mu_1_0')"> <---------이 부분을
<body onLoad="SetFix('mu_1_0','mu_3_0')"> <---- 1번과 3번 이미지가 보여야 한다고 할때 이렇게 하면 된다고 생각했는데... 안되네요...
부탁드립니다... ㅠㅠ
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 930 | 19년 전 | 3543 | ||
| 929 |
|
19년 전 | 2705 | |
| 928 |
|
19년 전 | 3455 | |
| 927 |
|
19년 전 | 3442 | |
| 926 |
|
19년 전 | 3148 | |
| 925 | 19년 전 | 5434 | ||
| 924 |
|
19년 전 | 2168 | |
| 923 |
|
19년 전 | 2221 | |
| 922 |
|
19년 전 | 2314 | |
| 921 |
|
19년 전 | 3409 | |
| 920 | 19년 전 | 3708 | ||
| 919 |
|
19년 전 | 3746 | |
| 918 |
|
19년 전 | 2366 | |
| 917 |
|
19년 전 | 2400 | |
| 916 |
|
19년 전 | 2704 | |
| 915 | 19년 전 | 3046 | ||
| 914 | 19년 전 | 2461 | ||
| 913 | 19년 전 | 2627 | ||
| 912 | 19년 전 | 2461 | ||
| 911 | 19년 전 | 2216 | ||
| 910 | 19년 전 | 3247 | ||
| 909 | 19년 전 | 3303 | ||
| 908 | 19년 전 | 3040 | ||
| 907 |
|
19년 전 | 4874 | |
| 906 |
|
19년 전 | 2714 | |
| 905 |
|
19년 전 | 3317 | |
| 904 |
|
19년 전 | 3149 | |
| 903 |
|
19년 전 | 1997 | |
| 902 |
|
19년 전 | 3143 | |
| 901 |
|
19년 전 | 1878 | |
| 900 |
|
19년 전 | 2337 | |
| 899 |
|
19년 전 | 2404 | |
| 898 |
|
19년 전 | 3985 | |
| 897 |
|
19년 전 | 3187 | |
| 896 |
|
19년 전 | 3103 | |
| 895 |
|
19년 전 | 2540 | |
| 894 |
|
19년 전 | 2016 | |
| 893 |
|
19년 전 | 1649 | |
| 892 |
|
19년 전 | 2416 | |
| 891 |
|
19년 전 | 2330 | |
| 890 |
|
19년 전 | 1815 | |
| 889 |
|
19년 전 | 1811 | |
| 888 |
|
19년 전 | 2612 | |
| 887 |
|
19년 전 | 2581 | |
| 886 |
|
19년 전 | 1875 | |
| 885 |
|
19년 전 | 2114 | |
| 884 |
|
19년 전 | 3306 | |
| 883 |
|
19년 전 | 1952 | |
| 882 |
|
19년 전 | 2502 | |
| 881 |
|
19년 전 | 2581 | |
| 880 |
|
19년 전 | 2664 | |
| 879 |
|
19년 전 | 2939 | |
| 878 |
|
19년 전 | 2559 | |
| 877 |
|
19년 전 | 2984 | |
| 876 |
|
19년 전 | 2762 | |
| 875 |
|
19년 전 | 3522 | |
| 874 | 19년 전 | 1872 | ||
| 873 | 19년 전 | 2735 | ||
| 872 |
|
19년 전 | 2375 | |
| 871 |
|
19년 전 | 2019 | |
| 870 |
|
19년 전 | 2427 | |
| 869 |
|
19년 전 | 1872 | |
| 868 |
|
19년 전 | 5440 | |
| 867 |
|
19년 전 | 2265 | |
| 866 |
|
19년 전 | 4261 | |
| 865 |
|
19년 전 | 2303 | |
| 864 | 19년 전 | 1850 | ||
| 863 | 19년 전 | 2606 | ||
| 862 | 19년 전 | 2333 | ||
| 861 | 19년 전 | 2535 | ||
| 860 | 19년 전 | 2162 | ||
| 859 | 19년 전 | 3927 | ||
| 858 | 19년 전 | 3419 | ||
| 857 | 19년 전 | 2198 | ||
| 856 |
Power
|
19년 전 | 2107 | |
| 855 | 19년 전 | 1972 | ||
| 854 | 19년 전 | 2004 | ||
| 853 |
pearly
|
19년 전 | 4389 | |
| 852 |
pearly
|
19년 전 | 3358 | |
| 851 | 19년 전 | 2774 | ||
| 850 |
pearly
|
19년 전 | 3354 | |
| 849 |
pearly
|
19년 전 | 3013 | |
| 848 |
pearly
|
19년 전 | 2843 | |
| 847 | 19년 전 | 2365 | ||
| 846 |
|
19년 전 | 2173 | |
| 845 |
pearly
|
19년 전 | 2494 | |
| 844 | 19년 전 | 3105 | ||
| 843 | 19년 전 | 2133 | ||
| 842 |
pearly
|
19년 전 | 3124 | |
| 841 |
pearly
|
19년 전 | 3246 | |
| 840 | 19년 전 | 2929 | ||
| 839 |
|
19년 전 | 1941 | |
| 838 |
|
19년 전 | 1707 | |
| 837 |
|
19년 전 | 2329 | |
| 836 |
|
19년 전 | 2271 | |
| 835 |
|
19년 전 | 1648 | |
| 834 |
|
19년 전 | 1666 | |
| 833 |
|
19년 전 | 1574 | |
| 832 |
|
19년 전 | 2067 | |
| 831 |
|
19년 전 | 1616 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기