javascript 팁이 있는 곳입니다.
  • 웹미니 한줄 전광판 영역 입니다.
글 수 109
미리보기 :  
<style>
.shakeimage{
position:relative
}
</style>
<script language="JavaScript1.2">

/*
Shake image script (onMouseover)- 
© Dynamic Drive (www.dynamicdrive.com)
For full source code, usage terms, and 100's more DHTML scripts, visit http://dynamicdrive.com
*/

//configure shake degree (where larger # equals greater shake)
var rector=3

///////DONE EDITTING///////////
var stopit=0 
var a=1

function init(which){
stopit=0
shake=which
shake.style.left=0
shake.style.top=0
}

function rattleimage(){
if ((!document.all&&!document.getElementById)||stopit==1)
return
if (a==1){
shake.style.top=parseInt(shake.style.top)+rector+"px"
}
else if (a==2){
//shake.style.left=parseInt(shake.style.left)+rector+"px"
}
else if (a==3){
shake.style.top=parseInt(shake.style.top)-rector+"px"
}
else{
//shake.style.left=parseInt(shake.style.left)-rector+"px"
}
if (a<4)
a++
else
a=1
setTimeout("rattleimage()",50)
}

function stoprattle(which){
stopit=1
which.style.left=0
which.style.top=0
}

</script>


<img src="http://www.google.com/images/nav_logo26.png" class="shakeimage" onMouseover="init(this);rattleimage()" onMouseout="stoprattle(this);top.focus()" onClick="top.focus()">

글쓴이가 작성한 다른 게시물

소중한 댓글 부탁드립니다.
추천수 10단위당 메달이 1개씩 노출되고, 추천수에 따라 배경색이 변하며, 일정수의 추천수를 받을시 BEST 아이콘이 붙게됩니다.
추천수에 따른 배경색 보기 본문으로 바로가기
  • 추천수 50개이상
  • 추천수 30개이상
  • 추천수 20개이상
  • 추천수 10개이상
  • 추천수 3개이상
닫기

첫번째 댓글을 남겨주세요!

List of Articles
번호 제목 글쓴이 날짜sort 추천 수 조회 수
9 롤링 자동 스크립트 웹기프트 2010-11-13   9124
8 이미지에 마우스 올리면... 이미지가 상하로 살짝쌀짝 웹기프트 2010-11-13   7002
7 hit 모바일페이지에서 주소창 자동숨김 title: [ani]깜빡이는 표정빽짱구 2011-01-19   11339
6 새로고침할때마다 바뀌는 랜덤배너 소스 title: [ani]깜빡이는 표정빽짱구 2011-07-21   8474
5 오늘날짜 스크립트 title: [ani]깜빡이는 표정빽짱구 2011-10-27   6632
4 모바일 페이지 코딩시 주소창 사라지는 방법 title: [ani]깜빡이는 표정빽짱구 2012-10-12   6230
3 클릭시 내용보여주고 숨기기 [1] title: [ani]방울UI 2013-06-25 1 5079
2 생활코딩이라는 사이트입니다. [3] title: [ani]깜빡이는 표정빽짱구 2014-05-14   2477
1 모바일 접속시 특정 페이지로 이동 title: [ani]깜빡이는 표정빽짱구 2018-10-21   356