얼마전, 어느 블로그에서 구현되었던걸 보고서 공부겸 만들어 보았습니다.
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에서 이동 됨]
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 1530 |
1111111
|
18년 전 | 1966 | |
| 1529 |
행복속네잎크로버
|
18년 전 | 3464 | |
| 1528 |
행복속네잎크로버
|
18년 전 | 1845 | |
| 1527 |
1111111
|
18년 전 | 7645 | |
| 1526 |
1111111
|
18년 전 | 3285 | |
| 1525 |
행복속네잎크로버
|
18년 전 | 1269 | |
| 1524 |
행복속네잎크로버
|
18년 전 | 2303 | |
| 1523 |
행복속네잎크로버
|
18년 전 | 3506 | |
| 1522 |
행복속네잎크로버
|
18년 전 | 2364 | |
| 1521 |
행복속네잎크로버
|
18년 전 | 2139 | |
| 1520 |
행복속네잎크로버
|
18년 전 | 2763 | |
| 1519 |
행복속네잎크로버
|
18년 전 | 3721 | |
| 1518 |
행복속네잎크로버
|
18년 전 | 3484 | |
| 1517 |
행복속네잎크로버
|
18년 전 | 2567 | |
| 1516 |
행복속네잎크로버
|
18년 전 | 1918 | |
| 1515 |
행복속네잎크로버
|
18년 전 | 1937 | |
| 1514 |
행복속네잎크로버
|
18년 전 | 2512 | |
| 1513 |
행복속네잎크로버
|
18년 전 | 1988 | |
| 1512 | 18년 전 | 2877 | ||
| 1511 | 18년 전 | 1665 | ||
| 1510 | 18년 전 | 2208 | ||
| 1509 | 18년 전 | 1686 | ||
| 1508 | 18년 전 | 2138 | ||
| 1507 | 18년 전 | 2361 | ||
| 1506 | 18년 전 | 2296 | ||
| 1505 | 18년 전 | 2247 | ||
| 1504 | 18년 전 | 2177 | ||
| 1503 | 18년 전 | 3487 | ||
| 1502 | 18년 전 | 1669 | ||
| 1501 | 18년 전 | 3441 | ||
| 1500 | 18년 전 | 2026 | ||
| 1499 | 18년 전 | 5294 | ||
| 1498 | 18년 전 | 2157 | ||
| 1497 |
hsp1980
|
18년 전 | 2341 | |
| 1496 |
hsp1980
|
18년 전 | 1730 | |
| 1495 |
hsp1980
|
18년 전 | 2133 | |
| 1494 |
hsp1980
|
18년 전 | 3649 | |
| 1493 | 18년 전 | 1502 | ||
| 1492 | 18년 전 | 1746 | ||
| 1491 | 18년 전 | 4320 | ||
| 1490 | 18년 전 | 3707 | ||
| 1489 | 18년 전 | 3265 | ||
| 1488 | 18년 전 | 3366 | ||
| 1487 |
mixdesign
|
18년 전 | 3868 | |
| 1486 |
mixdesign
|
18년 전 | 4326 | |
| 1485 | 18년 전 | 4250 | ||
| 1484 | 18년 전 | 2700 | ||
| 1483 |
hsp1980
|
18년 전 | 2310 | |
| 1482 |
hsp1980
|
18년 전 | 3247 | |
| 1481 |
hsp1980
|
18년 전 | 3163 | |
| 1480 |
hsp1980
|
18년 전 | 3317 | |
| 1479 | 18년 전 | 3256 | ||
| 1478 |
|
18년 전 | 4921 | |
| 1477 |
|
18년 전 | 5210 | |
| 1476 | 18년 전 | 3407 | ||
| 1475 |
mixdesign
|
18년 전 | 2721 | |
| 1474 |
mixdesign
|
18년 전 | 2939 | |
| 1473 |
mixdesign
|
18년 전 | 2267 | |
| 1472 |
mixdesign
|
18년 전 | 2085 | |
| 1471 |
mixdesign
|
18년 전 | 2040 | |
| 1470 |
|
18년 전 | 3073 | |
| 1469 |
mixdesign
|
18년 전 | 2355 | |
| 1468 |
mixdesign
|
18년 전 | 2378 | |
| 1467 |
mixdesign
|
18년 전 | 2060 | |
| 1466 |
mixdesign
|
18년 전 | 2424 | |
| 1465 |
mixdesign
|
18년 전 | 3157 | |
| 1464 | 18년 전 | 4084 | ||
| 1463 | 18년 전 | 3379 | ||
| 1462 |
|
18년 전 | 1999 | |
| 1461 |
|
18년 전 | 1942 | |
| 1460 | 18년 전 | 2857 | ||
| 1459 | 18년 전 | 1656 | ||
| 1458 |
|
18년 전 | 2006 | |
| 1457 |
mixdesign
|
18년 전 | 2301 | |
| 1456 |
mixdesign
|
18년 전 | 2168 | |
| 1455 | 18년 전 | 2275 | ||
| 1454 | 18년 전 | 4041 | ||
| 1453 | 18년 전 | 1780 | ||
| 1452 | 18년 전 | 4398 | ||
| 1451 | 18년 전 | 2930 | ||
| 1450 | 18년 전 | 2221 | ||
| 1449 | 18년 전 | 3267 | ||
| 1448 | 18년 전 | 2902 | ||
| 1447 | 18년 전 | 2825 | ||
| 1446 | 18년 전 | 5637 | ||
| 1445 | 18년 전 | 2297 | ||
| 1444 | 18년 전 | 3412 | ||
| 1443 |
|
18년 전 | 3331 | |
| 1442 | 18년 전 | 3716 | ||
| 1441 | 18년 전 | 3269 | ||
| 1440 | 18년 전 | 2446 | ||
| 1439 | 18년 전 | 2091 | ||
| 1438 | 18년 전 | 2543 | ||
| 1437 | 18년 전 | 6113 | ||
| 1436 | 18년 전 | 2735 | ||
| 1435 | 18년 전 | 4547 | ||
| 1434 | 18년 전 | 2048 | ||
| 1433 | 18년 전 | 10041 | ||
| 1432 | 18년 전 | 2484 | ||
| 1431 |
Psychedelico
|
18년 전 | 1549 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기