metaKey Event Attribute
Complete Event Object Reference
Definition and Usage
The metaKey event attribute returns a Boolean value that indicates whether or not the "meta" key was
pressed when an event was triggered.
Syntax
Example
The following example alerts whether or not the "meta" key was pressed when a
mouse button was clicked:
<html>
<head>
<script type="text/javascript">
function isKeyPressed(event)
{
if (event.metaKey==1)
{
alert("The meta key was pressed!")
}
else
{
alert("The meta key was NOT pressed!")
}
}
</script>
</head>
<body onmousedown="isKeyPressed(event)">
<p>Click somewhere in the document.
An alert box will tell you if you
pressed the meta key or not.</p>
</body>
</html>
|
Try-It-Yourself Demos
metaKey - Check whether or not the meta key is pressed
Complete Event Object Reference
Want To Be A Web Master?
If you want to be a Web Master, you will have to host your web site with an ISP (Internet Service Provider).
MaximumASP offers seven different configurations of dedicated servers to meet your Windows and .NET hosting needs.
Hosted on our multi-tiered Enterprise Class network, these servers provide the performance, security and reliability
you need to host your high end web sites and applications.
Visit MaximumASP
|