type Event Attribute
Complete Event Object Reference
Definition and Usage
The type event attribute returns the type of the triggered event.
Syntax
Example
The following example returns the type of event that was triggered:
<html>
<head>
<script type="text/javascript">
function getEventType(event)
{
alert(event.type);
}
</script>
</head>
<body onmousedown="getEventType(event)">
<p>Click somewhere in the document.
An alert box will tell what event
type you triggered.</p>
</body>
</html>
|
Try-It-Yourself Demos
type -
Return the type of event that was triggered
Complete Event Object Reference
|
|
|