얼마전, 어느 블로그에서 구현되었던걸 보고서 공부겸 만들어 보았습니다.
onMouseover 와 onMouseout에 this객체만 넣어주시면 됩니다.
많은 태클과 개선점 제시해 주시면 감사하겠습니다.
----------------------------------------------------------------------------------------------------------------
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled</title>
<style type="text/css">
.hym{
color:black;
font-weight:400;
margin:10px 0px 10px 0px;
cursor:help;
width:140px;
height:25px;
padding:3px;
border:1px solid red;
background-color:lightyellow;
}
</style>
<script language="javascript">
var colorArray = ["#cedfff","#b0acff","#ee311c","#8e60dd","#c875b5","#de8faf","#25dc8e","#61e274","#becb21","#dd7ce4"];
var display;
var colorNum = 0;
function setColor(aObj){
temp = 'setInterval(function(){ showColor(aObj); },60)';
display = eval(temp);
}
function showColor(aObj){
colorNum = colorNum == colorArray.length -1 ? 0:colorNum+=1;
aObj.style.color=colorArray[colorNum];
aObj.style.fontWeight = 700;
}
function BreakColor(aObj){
clearInterval(display);
aObj.style.fontWeight = 400;
aObj.style.color="black";
}
</script>
</head>
<body>
<div class="hym" onMouseover="setColor(this);" onMouseout="BreakColor(this);">Change Color..</div>
<div class="hym" onMouseover="setColor(this);" onMouseout="BreakColor(this);">Style Color...</div>
<div class="hym" onMouseover="setColor(this);" onMouseout="BreakColor(this);">Bye Bye Bye...</div>
</body>
</html>
onMouseover 와 onMouseout에 this객체만 넣어주시면 됩니다.
많은 태클과 개선점 제시해 주시면 감사하겠습니다.
----------------------------------------------------------------------------------------------------------------
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled</title>
<style type="text/css">
.hym{
color:black;
font-weight:400;
margin:10px 0px 10px 0px;
cursor:help;
width:140px;
height:25px;
padding:3px;
border:1px solid red;
background-color:lightyellow;
}
</style>
<script language="javascript">
var colorArray = ["#cedfff","#b0acff","#ee311c","#8e60dd","#c875b5","#de8faf","#25dc8e","#61e274","#becb21","#dd7ce4"];
var display;
var colorNum = 0;
function setColor(aObj){
temp = 'setInterval(function(){ showColor(aObj); },60)';
display = eval(temp);
}
function showColor(aObj){
colorNum = colorNum == colorArray.length -1 ? 0:colorNum+=1;
aObj.style.color=colorArray[colorNum];
aObj.style.fontWeight = 700;
}
function BreakColor(aObj){
clearInterval(display);
aObj.style.fontWeight = 400;
aObj.style.color="black";
}
</script>
</head>
<body>
<div class="hym" onMouseover="setColor(this);" onMouseout="BreakColor(this);">Change Color..</div>
<div class="hym" onMouseover="setColor(this);" onMouseout="BreakColor(this);">Style Color...</div>
<div class="hym" onMouseover="setColor(this);" onMouseout="BreakColor(this);">Bye Bye Bye...</div>
</body>
</html>
[이 게시물은 관리자님에 의해 2011-10-31 17:16:08 PHP & HTML에서 이동 됨]
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 7630 | 10년 전 | 653 | ||
| 7629 |
|
10년 전 | 2394 | |
| 7628 | 10년 전 | 793 | ||
| 7627 |
|
10년 전 | 1034 | |
| 7626 |
|
10년 전 | 1789 | |
| 7625 | 10년 전 | 713 | ||
| 7624 | 10년 전 | 729 | ||
| 7623 |
|
10년 전 | 3097 | |
| 7622 | 10년 전 | 729 | ||
| 7621 |
leeleeleelee
|
10년 전 | 588 | |
| 7620 | 10년 전 | 540 | ||
| 7619 | 10년 전 | 494 | ||
| 7618 | 10년 전 | 1029 | ||
| 7617 | 10년 전 | 729 | ||
| 7616 | 10년 전 | 651 | ||
| 7615 | 10년 전 | 728 | ||
| 7614 | 10년 전 | 1267 | ||
| 7613 |
|
10년 전 | 2086 | |
| 7612 | 10년 전 | 1149 | ||
| 7611 | 10년 전 | 1419 | ||
| 7610 |
|
10년 전 | 1906 | |
| 7609 |
|
10년 전 | 1355 | |
| 7608 |
mwdkim
|
10년 전 | 1134 | |
| 7607 |
|
10년 전 | 1057 | |
| 7606 |
mwdkim
|
10년 전 | 3931 | |
| 7605 | 10년 전 | 695 | ||
| 7604 | 10년 전 | 1031 | ||
| 7603 | 10년 전 | 1654 | ||
| 7602 |
|
10년 전 | 1080 | |
| 7601 |
AniNest
|
10년 전 | 2795 | |
| 7600 |
port443
|
10년 전 | 1035 | |
| 7599 | 10년 전 | 947 | ||
| 7598 | 10년 전 | 1022 | ||
| 7597 | 10년 전 | 4577 | ||
| 7596 |
SeungYeon
|
10년 전 | 894 | |
| 7595 |
untitled
|
10년 전 | 2430 | |
| 7594 |
프로그래머7
|
10년 전 | 1734 | |
| 7593 |
untitled
|
10년 전 | 2372 | |
| 7592 |
untitled
|
10년 전 | 1946 | |
| 7591 |
untitled
|
10년 전 | 2679 | |
| 7590 |
아리마2001
|
10년 전 | 855 | |
| 7589 | 10년 전 | 1115 | ||
| 7588 |
|
10년 전 | 2923 | |
| 7587 | 10년 전 | 1307 | ||
| 7586 | 10년 전 | 673 | ||
| 7585 | 10년 전 | 1697 | ||
| 7584 | 10년 전 | 1414 | ||
| 7583 |
leeleeleelee
|
10년 전 | 1164 | |
| 7582 |
|
10년 전 | 1121 | |
| 7581 | 10년 전 | 1352 | ||
| 7580 | 10년 전 | 1001 | ||
| 7579 |
|
10년 전 | 610 | |
| 7578 | 10년 전 | 1432 | ||
| 7577 |
|
10년 전 | 1874 | |
| 7576 | 10년 전 | 1390 | ||
| 7575 |
멋진남자임
|
10년 전 | 1466 | |
| 7574 | 10년 전 | 2124 | ||
| 7573 | 10년 전 | 3260 | ||
| 7572 | 10년 전 | 761 | ||
| 7571 |
|
10년 전 | 784 | |
| 7570 |
|
10년 전 | 1319 | |
| 7569 | 10년 전 | 1554 | ||
| 7568 |
this1mg
|
10년 전 | 1054 | |
| 7567 |
|
10년 전 | 766 | |
| 7566 | 10년 전 | 920 | ||
| 7565 |
Angel하늘
|
10년 전 | 1013 | |
| 7564 |
seoldi
|
10년 전 | 1246 | |
| 7563 |
|
10년 전 | 1390 | |
| 7562 |
멋진남자임
|
10년 전 | 2090 | |
| 7561 | 10년 전 | 714 | ||
| 7560 |
leeleeleelee
|
10년 전 | 911 | |
| 7559 | 10년 전 | 5050 | ||
| 7558 |
RinaP
|
10년 전 | 787 | |
| 7557 |
|
10년 전 | 1250 | |
| 7556 | 10년 전 | 1197 | ||
| 7555 |
hyohyojj1234
|
10년 전 | 1666 | |
| 7554 | 10년 전 | 1096 | ||
| 7553 |
senseme
|
10년 전 | 1341 | |
| 7552 |
ehdltdoit
|
10년 전 | 1437 | |
| 7551 |
|
10년 전 | 1827 | |
| 7550 |
leeleeleelee
|
10년 전 | 1593 | |
| 7549 | 10년 전 | 2426 | ||
| 7548 | 10년 전 | 1847 | ||
| 7547 |
멋진남자임
|
10년 전 | 1964 | |
| 7546 | 10년 전 | 1007 | ||
| 7545 |
ILMare1003
|
10년 전 | 1293 | |
| 7544 |
|
10년 전 | 1256 | |
| 7543 | 10년 전 | 891 | ||
| 7542 | 10년 전 | 660 | ||
| 7541 |
울라라라우
|
10년 전 | 867 | |
| 7540 | 10년 전 | 1601 | ||
| 7539 | 10년 전 | 937 | ||
| 7538 |
|
10년 전 | 1834 | |
| 7537 | 10년 전 | 3615 | ||
| 7536 |
Gaumi
|
10년 전 | 1417 | |
| 7535 |
프로그램은어려워
|
10년 전 | 1277 | |
| 7534 |
senseme
|
10년 전 | 1208 | |
| 7533 | 10년 전 | 1205 | ||
| 7532 | 10년 전 | 860 | ||
| 7531 | 10년 전 | 2059 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기