<!---------------------------------------------------------------------------------------
▶ 기능: 클릭한 메뉴 고정하기
---------------------------------------------------------------------------------------->
<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번 이미지가 보여야 한다고 할때 이렇게 하면 된다고 생각했는데... 안되네요...
부탁드립니다... ㅠㅠ
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 1030 | 18년 전 | 1774 | ||
| 1029 | 18년 전 | 2209 | ||
| 1028 | 18년 전 | 2623 | ||
| 1027 | 18년 전 | 1782 | ||
| 1026 | 18년 전 | 1513 | ||
| 1025 | 18년 전 | 1529 | ||
| 1024 | 18년 전 | 1456 | ||
| 1023 | 18년 전 | 3217 | ||
| 1022 | 18년 전 | 2908 | ||
| 1021 | 18년 전 | 1664 | ||
| 1020 | 18년 전 | 3405 | ||
| 1019 | 18년 전 | 1833 | ||
| 1018 | 18년 전 | 1483 | ||
| 1017 | 18년 전 | 1942 | ||
| 1016 | 18년 전 | 2090 | ||
| 1015 | 18년 전 | 1623 | ||
| 1014 | 18년 전 | 2336 | ||
| 1013 | 18년 전 | 1991 | ||
| 1012 | 18년 전 | 1602 | ||
| 1011 | 18년 전 | 1779 | ||
| 1010 | 18년 전 | 2033 | ||
| 1009 | 18년 전 | 1791 | ||
| 1008 | 18년 전 | 1592 | ||
| 1007 | 18년 전 | 1652 | ||
| 1006 | 18년 전 | 3123 | ||
| 1005 | 18년 전 | 1986 | ||
| 1004 | 18년 전 | 1860 | ||
| 1003 | 18년 전 | 4363 | ||
| 1002 | 18년 전 | 4990 | ||
| 1001 | 18년 전 | 3155 | ||
| 1000 | 18년 전 | 2900 | ||
| 999 | 18년 전 | 3492 | ||
| 998 | 18년 전 | 2035 | ||
| 997 | 18년 전 | 2382 | ||
| 996 | 18년 전 | 2680 | ||
| 995 | 18년 전 | 2750 | ||
| 994 | 18년 전 | 2342 | ||
| 993 | 18년 전 | 1607 | ||
| 992 | 18년 전 | 3372 | ||
| 991 | 18년 전 | 1970 | ||
| 990 | 18년 전 | 2376 | ||
| 989 | 18년 전 | 2447 | ||
| 988 | 18년 전 | 2874 | ||
| 987 | 18년 전 | 5208 | ||
| 986 |
|
18년 전 | 2482 | |
| 985 |
|
18년 전 | 3326 | |
| 984 | 18년 전 | 4272 | ||
| 983 |
느낌좋은날
|
18년 전 | 2492 | |
| 982 | 18년 전 | 2458 | ||
| 981 | 18년 전 | 4032 | ||
| 980 | 18년 전 | 2746 | ||
| 979 |
Sinpre
|
19년 전 | 2982 | |
| 978 | 19년 전 | 2196 | ||
| 977 | 19년 전 | 2215 | ||
| 976 | 19년 전 | 1990 | ||
| 975 | 19년 전 | 3270 | ||
| 974 | 19년 전 | 2103 | ||
| 973 |
|
19년 전 | 2777 | |
| 972 |
|
19년 전 | 1736 | |
| 971 | 19년 전 | 5307 | ||
| 970 | 19년 전 | 3560 | ||
| 969 | 19년 전 | 4312 | ||
| 968 | 19년 전 | 3054 | ||
| 967 | 19년 전 | 2520 | ||
| 966 | 19년 전 | 3916 | ||
| 965 | 19년 전 | 2639 | ||
| 964 | 19년 전 | 2986 | ||
| 963 | 19년 전 | 2953 | ||
| 962 | 19년 전 | 4172 | ||
| 961 | 19년 전 | 3121 | ||
| 960 | 19년 전 | 3016 | ||
| 959 | 19년 전 | 3665 | ||
| 958 | 19년 전 | 2967 | ||
| 957 | 19년 전 | 2189 | ||
| 956 | 19년 전 | 2219 | ||
| 955 | 19년 전 | 2157 | ||
| 954 | 19년 전 | 2762 | ||
| 953 | 19년 전 | 2470 | ||
| 952 | 19년 전 | 3335 | ||
| 951 | 19년 전 | 3188 | ||
| 950 | 19년 전 | 1819 | ||
| 949 | 19년 전 | 2736 | ||
| 948 | 19년 전 | 7819 | ||
| 947 |
|
19년 전 | 2490 | |
| 946 |
DeepnBlue
|
19년 전 | 3096 | |
| 945 |
pearly
|
19년 전 | 2848 | |
| 944 | 19년 전 | 3011 | ||
| 943 |
|
19년 전 | 2211 | |
| 942 | 19년 전 | 2447 | ||
| 941 |
|
19년 전 | 4067 | |
| 940 | 19년 전 | 2226 | ||
| 939 |
|
19년 전 | 4215 | |
| 938 |
|
19년 전 | 2376 | |
| 937 | 19년 전 | 2071 | ||
| 936 |
|
19년 전 | 2320 | |
| 935 | 19년 전 | 1863 | ||
| 934 |
|
19년 전 | 2396 | |
| 933 | 19년 전 | 2188 | ||
| 932 |
|
19년 전 | 3060 | |
| 931 | 19년 전 | 1845 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기