1. <script> 
  2. <!-- 
  3. var rector=2 
  4. var stopit=0 
  5. var a=1 
  6. var count=0 
  7. function init(which){ 
  8.     stopit=0 
  9.     shake=which 
  10.     shake.style.left=0 
  11.     shake.style.top=0 
  12. function rattleimage(){ 
  13.     if ((!document.all&&!document.getElementById)||stopit==1||count==100) 
  14.         return 
  15.         count++ 
  16.     if (a==1){ 
  17.         shake.style.top=parseInt(shake.style.top)+rector 
  18.     } 
  19.     else if (a==2){ 
  20.         shake.style.left=parseInt(shake.style.left)+rector 
  21.     } 
  22.     else if (a==3){ 
  23.         shake.style.top=parseInt(shake.style.top)-rector 
  24.     } 
  25.     else{ 
  26.         shake.style.left=parseInt(shake.style.left)-rector 
  27.     } 
  28.     if (a<4
  29.         a++ 
  30.     else 
  31.         a=1 
  32.         setTimeout("rattleimage()",50) 
  33. function stoprattle(which){ 
  34.     stopit=1 
  35.     count=0 
  36.     which.style.left=0 
  37.     which.style.top=0 
  38. //--> 
  39. </script> 
  40. <style>.shakeimage{POSITION: relative}</style> 
  41. <img src="2012-07-24_103948.jpg" onmouseout=stoprattle(this) onmouseover=init(this);rattleimage() class=shakeimage />