<!---------------------------------------------------------------------------------------
▶ 기능: 클릭한 메뉴 고정하기
---------------------------------------------------------------------------------------->
<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번 이미지가 보여야 한다고 할때 이렇게 하면 된다고 생각했는데... 안되네요...
부탁드립니다... ㅠㅠ
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 8230 | 9년 전 | 65 | ||
| 8229 | 9년 전 | 66 | ||
| 8228 |
커네드커네드
|
9년 전 | 110 | |
| 8227 | 9년 전 | 120 | ||
| 8226 | 9년 전 | 158 | ||
| 8225 | 9년 전 | 146 | ||
| 8224 | 9년 전 | 143 | ||
| 8223 | 9년 전 | 111 | ||
| 8222 |
|
9년 전 | 179 | |
| 8221 | 9년 전 | 83 | ||
| 8220 | 9년 전 | 97 | ||
| 8219 | 9년 전 | 96 | ||
| 8218 | 9년 전 | 133 | ||
| 8217 |
star3840
|
9년 전 | 109 | |
| 8216 | 9년 전 | 158 | ||
| 8215 | 9년 전 | 105 | ||
| 8214 | 9년 전 | 221 | ||
| 8213 | 9년 전 | 154 | ||
| 8212 | 9년 전 | 81 | ||
| 8211 | 9년 전 | 241 | ||
| 8210 | 9년 전 | 239 | ||
| 8209 | 9년 전 | 331 | ||
| 8208 | 9년 전 | 213 | ||
| 8207 | 9년 전 | 220 | ||
| 8206 |
|
9년 전 | 182 | |
| 8205 | 9년 전 | 166 | ||
| 8204 | 9년 전 | 128 | ||
| 8203 | 9년 전 | 228 | ||
| 8202 | 9년 전 | 137 | ||
| 8201 | 9년 전 | 176 | ||
| 8200 | 9년 전 | 156 | ||
| 8199 | 9년 전 | 206 | ||
| 8198 | 9년 전 | 168 | ||
| 8197 | 9년 전 | 158 | ||
| 8196 | 9년 전 | 547 | ||
| 8195 | 9년 전 | 154 | ||
| 8194 | 9년 전 | 279 | ||
| 8193 | 9년 전 | 153 | ||
| 8192 | 9년 전 | 181 | ||
| 8191 | 9년 전 | 133 | ||
| 8190 | 9년 전 | 126 | ||
| 8189 | 9년 전 | 185 | ||
| 8188 | 9년 전 | 125 | ||
| 8187 | 9년 전 | 138 | ||
| 8186 | 9년 전 | 138 | ||
| 8185 | 9년 전 | 305 | ||
| 8184 | 9년 전 | 106 | ||
| 8183 | 9년 전 | 320 | ||
| 8182 | 9년 전 | 163 | ||
| 8181 | 9년 전 | 126 | ||
| 8180 | 9년 전 | 690 | ||
| 8179 | 9년 전 | 480 | ||
| 8178 | 9년 전 | 306 | ||
| 8177 |
kiplayer
|
9년 전 | 309 | |
| 8176 | 9년 전 | 346 | ||
| 8175 | 9년 전 | 217 | ||
| 8174 | 9년 전 | 235 | ||
| 8173 | 9년 전 | 341 | ||
| 8172 | 9년 전 | 192 | ||
| 8171 | 9년 전 | 179 | ||
| 8170 | 9년 전 | 293 | ||
| 8169 |
커네드커네드
|
9년 전 | 254 | |
| 8168 | 9년 전 | 314 | ||
| 8167 | 9년 전 | 316 | ||
| 8166 | 9년 전 | 231 | ||
| 8165 | 9년 전 | 161 | ||
| 8164 | 9년 전 | 299 | ||
| 8163 | 9년 전 | 279 | ||
| 8162 | 9년 전 | 293 | ||
| 8161 | 9년 전 | 291 | ||
| 8160 |
|
9년 전 | 483 | |
| 8159 | 9년 전 | 423 | ||
| 8158 | 9년 전 | 243 | ||
| 8157 | 9년 전 | 370 | ||
| 8156 | 9년 전 | 273 | ||
| 8155 | 9년 전 | 249 | ||
| 8154 |
00년생용띠
|
9년 전 | 596 | |
| 8153 | 9년 전 | 224 | ||
| 8152 |
|
9년 전 | 401 | |
| 8151 | 9년 전 | 404 | ||
| 8150 | 9년 전 | 497 | ||
| 8149 |
Jangfolk
|
9년 전 | 343 | |
| 8148 | 9년 전 | 163 | ||
| 8147 | 9년 전 | 370 | ||
| 8146 | 9년 전 | 429 | ||
| 8145 | 9년 전 | 375 | ||
| 8144 | 9년 전 | 341 | ||
| 8143 | 9년 전 | 188 | ||
| 8142 | 9년 전 | 425 | ||
| 8141 | 9년 전 | 378 | ||
| 8140 | 9년 전 | 925 | ||
| 8139 | 9년 전 | 254 | ||
| 8138 |
전갈자리남자
|
9년 전 | 383 | |
| 8137 | 9년 전 | 391 | ||
| 8136 | 9년 전 | 742 | ||
| 8135 |
|
9년 전 | 790 | |
| 8134 |
PlayPixel
|
9년 전 | 507 | |
| 8133 |
|
9년 전 | 431 | |
| 8132 | 9년 전 | 444 | ||
| 8131 | 9년 전 | 808 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기