daily pastebin goal
72%
SHARE
TWEET

Untitled

a guest Feb 13th, 2018 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <html>
  2. <head>
  3. <script>
  4. var totalClicks=0;
  5. var click=0;
  6. var doubleClick=0;
  7. var mouseOver=0;
  8. var mouseOut=0;
  9. function onClick(){
  10.     click++;
  11.     totalClicks++
  12.     document.getElementById("counter").innerHTML="Total Clicks: "+totalClicks+"<br>Clicks: "+click+"<br>Double Clicks: "+doubleClick+"<br>Mouse Over: "+mouseOver+"<br>Mouse Out: "+mouseOut;
  13.     WOAH();
  14. }
  15.  
  16. function onDblClick(){
  17.     ondblclick++;
  18.     totalClicks+=2;
  19.     document.getElementById("counter").innerHTML="Total Clicks: "+totalClicks+"<br>Clicks: "+click+"<br>Double Clicks: "+doubleClick+"<br>Mouse Over: "+mouseOver+"<br>Mouse Out: "+mouseOut;
  20.     WOAH();
  21. }
  22.  
  23. function onMouseOver(){
  24.     onMouseOver++;
  25.     document.getElementById("counter").innerHTML="Total Clicks: "+totalClicks+"<br>Clicks: "+click+"<br>Double Clicks: "+doubleClick+"<br>Mouse Over: "+mouseOver+"<br>Mouse Out: "+mouseOut;
  26. }
  27.  
  28. function onMouseOut(){
  29.     onMouseOut++;
  30.     document.getElementById("counter").innerHTML="Total Clicks: "+totalClicks+"<br>Clicks: "+click+"<br>Double Clicks: "+doubleClick+"<br>Mouse Over: "+mouseOver+"<br>Mouse Out: "+mouseOut;
  31. }
  32.    
  33. function WOAH(){
  34.     if(totalClicks%10==0){
  35.     document.body.style.backgroundColor= "red";
  36.     setTimeout("document.body.style.backgroundColor= 'gray'",250);
  37.     }
  38. }
  39. </script>
  40. </head>
  41. <body bgcolor="grey">
  42. <p id="counter">Clicks: 0<br>Double Clicks: 0<br>Mouse Over: 0<br>Mouse Out: 0</p>
  43. <center>
  44. <img id="pony" onclick="onClick()" ondblclick="onDblClick()" onmouseover="onMouseOver()" onmouseout="onMouseOut()" src="https://vignette.wikia.nocookie.net/mlpfanart/images/3/30/Luna_Dance_By_Alpha_Channel.gif/revision/latest?cb=20120710235804">
  45. </center>
  46. </div>
  47. </body>
  48. </html>
  49. <!--by Jaroslaw Janas-->
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top