<!---------------------------------------------------------------------------------------
▶ 기능: 클릭한 메뉴 고정하기
---------------------------------------------------------------------------------------->
<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번 이미지가 보여야 한다고 할때 이렇게 하면 된다고 생각했는데... 안되네요...
부탁드립니다... ㅠㅠ
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 330 |
prosper
|
20년 전 | 2288 | |
| 329 |
prosper
|
20년 전 | 1919 | |
| 328 |
prosper
|
20년 전 | 1711 | |
| 327 | 20년 전 | 3778 | ||
| 326 | 20년 전 | 4865 | ||
| 325 |
hwatta
|
20년 전 | 2493 | |
| 324 |
|
20년 전 | 3150 | |
| 323 | 20년 전 | 5875 | ||
| 322 |
hwatta
|
20년 전 | 2859 | |
| 321 |
hwatta
|
20년 전 | 2331 | |
| 320 |
yesmoa
|
20년 전 | 4583 | |
| 319 | 20년 전 | 2695 | ||
| 318 | 20년 전 | 2244 | ||
| 317 |
kyodon
|
20년 전 | 2765 | |
| 316 | 20년 전 | 2588 | ||
| 315 |
|
20년 전 | 2890 | |
| 314 |
|
20년 전 | 3348 | |
| 313 |
|
20년 전 | 2654 | |
| 312 |
yesmoa
|
20년 전 | 4731 | |
| 311 | 20년 전 | 3288 | ||
| 310 |
홀로남은자
|
20년 전 | 4576 | |
| 309 | 20년 전 | 3011 | ||
| 308 | 20년 전 | 4145 | ||
| 307 | 20년 전 | 4382 | ||
| 306 | 20년 전 | 7044 | ||
| 305 | 20년 전 | 3877 | ||
| 304 | 20년 전 | 2776 | ||
| 303 |
크리스탈처럼
|
20년 전 | 4416 | |
| 302 | 20년 전 | 2216 | ||
| 301 |
|
20년 전 | 4334 | |
| 300 | 20년 전 | 3819 | ||
| 299 | 20년 전 | 2637 | ||
| 298 | 20년 전 | 4847 | ||
| 297 |
|
20년 전 | 2536 | |
| 296 | 20년 전 | 4542 | ||
| 295 | 20년 전 | 3574 | ||
| 294 | 20년 전 | 3598 | ||
| 293 | 20년 전 | 3826 | ||
| 292 | 20년 전 | 3221 | ||
| 291 |
yesmoa
|
20년 전 | 5960 | |
| 290 | 20년 전 | 2948 | ||
| 289 | 20년 전 | 5870 | ||
| 288 |
|
20년 전 | 2385 | |
| 287 |
|
20년 전 | 1819 | |
| 286 |
|
20년 전 | 2158 | |
| 285 |
|
20년 전 | 3550 | |
| 284 |
|
20년 전 | 2045 | |
| 283 |
|
20년 전 | 4406 | |
| 282 | 20년 전 | 3387 | ||
| 281 |
|
20년 전 | 2218 | |
| 280 |
|
20년 전 | 7819 | |
| 279 | 20년 전 | 5568 | ||
| 278 | 20년 전 | 3005 | ||
| 277 |
|
20년 전 | 5577 | |
| 276 | 20년 전 | 2367 | ||
| 275 | 20년 전 | 2624 | ||
| 274 | 20년 전 | 2405 | ||
| 273 | 20년 전 | 2239 | ||
| 272 | 20년 전 | 2167 | ||
| 271 | 20년 전 | 2635 | ||
| 270 | 20년 전 | 2675 | ||
| 269 | 20년 전 | 2518 | ||
| 268 | 20년 전 | 2703 | ||
| 267 | 20년 전 | 2385 | ||
| 266 | 20년 전 | 2576 | ||
| 265 | 20년 전 | 3517 | ||
| 264 |
|
20년 전 | 5381 | |
| 263 |
|
20년 전 | 3743 | |
| 262 | 20년 전 | 3203 | ||
| 261 |
허저비
|
20년 전 | 5947 | |
| 260 |
|
20년 전 | 5724 | |
| 259 | 20년 전 | 4150 | ||
| 258 | 20년 전 | 2384 | ||
| 257 | 20년 전 | 3207 | ||
| 256 | 20년 전 | 1919 | ||
| 255 | 20년 전 | 1589 | ||
| 254 | 20년 전 | 3160 | ||
| 253 | 20년 전 | 3553 | ||
| 252 | 20년 전 | 5139 | ||
| 251 | 20년 전 | 5830 | ||
| 250 | 20년 전 | 3688 | ||
| 249 | 20년 전 | 5033 | ||
| 248 | 20년 전 | 3303 | ||
| 247 | 20년 전 | 3659 | ||
| 246 |
|
20년 전 | 7967 | |
| 245 |
|
20년 전 | 5929 | |
| 244 | 20년 전 | 4498 | ||
| 243 |
|
20년 전 | 4078 | |
| 242 | 20년 전 | 2809 | ||
| 241 | 20년 전 | 2754 | ||
| 240 | 20년 전 | 2390 | ||
| 239 | 20년 전 | 1680 | ||
| 238 |
아우겐나이스
|
20년 전 | 2287 | |
| 237 |
email
|
20년 전 | 3701 | |
| 236 | 20년 전 | 4185 | ||
| 235 | 20년 전 | 10476 | ||
| 234 | 20년 전 | 5085 | ||
| 233 | 20년 전 | 3389 | ||
| 232 | 20년 전 | 3230 | ||
| 231 | 20년 전 | 3873 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기