JavaScript Reference/Event Handlers Reference/onContextMenu — различия между версиями
Admin (обсуждение | вклад) м (1 версия) |
|
(нет различий)
|
Текущая версия на 11:22, 26 мая 2010
Содержание
"onContextMenu" Example
<source lang="javascript">
<html> <head> <script language="JavaScript">
function function2() { alert("This image is copyrighted") }
</script> </head> <body oncontextmenu="function2()">
Right click in the image.
<img oncontextmenu="function2()" src="http://www.wbex.ru/style/logo.png" alt="" width="99" height="76">
</body> </html> If you want to prevent the user from opening the context menu, add the following code to the <body> element above: oncontextmenu="function2(); return false;"
</source>
"onContextMenu" is applied to
<source lang="javascript">
+----------------+--------------------------------------------------------------+ | Applied_To |<a> <address> | | |<applet> <area> | | | |
| ||| |<body> <button> |
| || | |
| || | |<custom>
| | | <dir> | |
| |document
- | | | <embed> | | |<fieldset> | | |<form> <hn> | | |
|| |<img> <input type="button"> | | |<input type="checkbox"> <input type="file"> | | |<inputtype="image"> <input type="password"> | | |<input type="radio"> <input type="reset"> | | |<input type="submit"> <input type="text"> | | | <label> |
| |<legend>- | | |<listing> <marquee> | | |<menu> <nobr> | | |
| | |