티스토리 뷰
1.html
2.css
.main_leftBtn{position:absolute;overflow:hidden;top:263px;left:5px;cursor:pointer;}
.main_rightBtn{position:absolute;overflow:hidden;top:263px;left:928px;cursor:pointer;}
3.javascript
function img_rolover_rolout(id,img_title,e){
var e = e || window.event;
if(e.type == "mouseover"){
id.src = "images/" + img_title +"_on.png";
}else{
id.src = "images/" + img_title +"_off.png";
}
}
ps. 롤오버 원래 철자는 roll 이 맞다. 수정하기 귀찮아서 패스..
'■ 프론트엔드 ■ > JavaScript' 카테고리의 다른 글
| new - Class생성 (0) | 2013.10.13 |
|---|---|
| onload - 페이지 로딩시 바로 시작되는 함수 (0) | 2013.10.13 |
| Array - 2차원배열 (0) | 2013.10.13 |
| indexOf - 를 이용한 substring (0) | 2013.10.13 |
| window.cancelAnimationFrame() - 애니메이션 타이밍 정지 (0) | 2013.10.13 |
댓글