<html>
<body
onmousedown="myFunction(event)"
onmouseup="myFunction(event)"
onkeydown="myFunction(event)"
onkeyup="myFunction(event)">
<p>Press any key or click the mouse in this document to get what type of event that was triggered.</p>
<p>Event: <span id="demo"></span></p>
<script>
function myFunction(event) {
var x = event.type;
document.getElementById("demo").innerHTML = x;
}
</script>
</body>
<!-- Mirrored from www.w3schools.com/jsref/tryit.asp?filename=tryjsref_event_type by HTTrack Website Copier/3.x [XR&CO'2014], Mon, 27 Jan 2020 03:03:02 GMT -->
</html>