daily pastebin goal
29%
SHARE
TWEET

Untitled

a guest Feb 13th, 2018 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <html>
  2. <head>
  3. <script>
  4. var totalClicksVar=0;
  5. var clickVar=0;
  6. var doubleClickVar=0;
  7. var mouseOverVar=0;
  8. var mouseOutVar=0;
  9. function onClickCounter(){
  10.     clickVar++;
  11.     totalClicksVar++
  12.     document.getElementById("counter").innerHTML="Total Clicks: "+totalClicksVar+"<br>Clicks: "+clickVar+"<br>Double Clicks: "+doubleClickVar+"<br>Mouse Over: "+mouseOverVar+"<br>Mouse Out: "+mouseOutVar;
  13.     WOAH();
  14. }
  15.  
  16. function onDblClickCounter(){
  17.     doubleClickVar++;
  18.     document.getElementById("counter").innerHTML="Total Clicks: "+totalClicksVar+"<br>Clicks: "+clickVar+"<br>Double Clicks: "+doubleClickVar+"<br>Mouse Over: "+mouseOverVar+"<br>Mouse Out: "+mouseOutVar;
  19.     WOAH();
  20. }
  21.  
  22. function onMouseOverCounter(){
  23.     mouseOverVar++;
  24.     document.getElementById("counter").innerHTML="Total Clicks: "+totalClicksVar+"<br>Clicks: "+clickVar+"<br>Double Clicks: "+doubleClickVar+"<br>Mouse Over: "+mouseOverVar+"<br>Mouse Out: "+mouseOutVar;
  25. }
  26.  
  27. function onMouseOutCounter(){
  28.     mouseOutVar++;
  29.     document.getElementById("counter").innerHTML="Total Clicks: "+totalClicksVar+"<br>Clicks: "+clickVar+"<br>Double Clicks: "+doubleClickVar+"<br>Mouse Over: "+mouseOverVar+"<br>Mouse Out: "+mouseOutVar;
  30. }
  31.    
  32. function WOAH(){
  33.     if(totalClicksVar%10==0){
  34.     document.body.style.backgroundColor= "red";
  35.     setTimeout("document.body.style.backgroundColor= 'gray'",250);
  36.     }
  37. }
  38. </script>
  39. </head>
  40. <body bgcolor="grey">
  41. <p id="counter">Clicks: 0<br>Double Clicks: 0<br>Mouse Over: 0<br>Mouse Out: 0</p>
  42. <center>
  43. <img id="pony" onclick="onClickCounter()" ondblclick="onDblClickCounter()" onmouseover="onMouseOverCounter()" onmouseout="onMouseOutCounter()" src="https://vignette.wikia.nocookie.net/mlpfanart/images/3/30/Luna_Dance_By_Alpha_Channel.gif/revision/latest?cb=20120710235804">
  44. </center>
  45. </div>
  46. </body>
  47. </html>
  48. <!--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