Skip to content

Instantly share code, notes, and snippets.

@sayham-sjb
Last active January 25, 2018 18:13
Show Gist options
  • Save sayham-sjb/6c44b90591bf6f20b0e952b33009e510 to your computer and use it in GitHub Desktop.
Save sayham-sjb/6c44b90591bf6f20b0e952b33009e510 to your computer and use it in GitHub Desktop.
ClickCountWithHovering #html #VS
<html>
<head>
<script>
var hoverCount = 1;
</script>
</head>
<body>
<div style="text-align: center;">
<button class="hoverButton" type='button'
onmouseover='alert ("Hovered " + hoverCount +" times.");
++hoverCount'>HOVER COUNT</button>
<button class="hoverButton" type='button'
onmouseover='alert ("Hover count is cleared.");
hoverCount = 1'>RESET COUNT</button>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment