JavaScript Reference/Event Handlers Reference/onDrop — различия между версиями
(нет различий)
|
Версия 21:30, 25 мая 2010
Содержание
"onDrop" Example
<source lang="javascript">
<html> <head> <script language="JavaScript">
</script> </head> <body bottommargin=150>
Source object:
<input id="sourceObject" size=50 value="The text to Drag" ondrop="function1()">
Drop selected text into the following text field.
Target object:
<input id="targetObject" size=50 value="Drag destination element"> </body> </html>
</source>
"onDrop" is applied to
<source lang="javascript">
+----------------+--------------------------------------------------------------+ | Applied_To |<a> <acronym> | | |<address> <area> | | | |
| ||| |<body> <button> |
| || | |
| |<dir>| | |<custom>
| | | || | |document | | |
- | | |<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> |
| |- <listing> | | |<map> <marquee> | | |<menu> <nobr> | | |<object>
| | |<option>
| | |
| | || | |<select> | | || | | | | || | |<tbody>
| | |<textarea> | | | | | | | | |<xmp> | +----------------+--------------------------------------------------------------+ </source>
"onDrop" Properties
<source lang="javascript"> +----------------+--------------------------------------------------------------+ | Properties |altKey altLeft | | |cancelBubble clientX | | |clientY ctrlKey | | |ctrlLeft dataTransfer | | |offsetX offsetY | | |returnValue screenX | | |screenY shiftLeft | | |srcElement type | | |x y | +----------------+--------------------------------------------------------------+
</source>
"onDrop" Syntax and Note
<source lang="javascript"> Note:
This event fires when the user releases the mouse button on the target area. For this event to fire, the object must support drag and drop.
</source>