JavaScript Reference/Event Handlers Reference/onDragEnd — различия между версиями
Admin (обсуждение | вклад) м (1 версия) |
|
(нет различий)
|
Текущая версия на 08:22, 26 мая 2010
Содержание
"onDragEnd" Example
<html>
<head>
<script language="JavaScript">
<!--
function function1() {
msg = "on" + event.type + " event fired by " + """ + event.srcElement.id + """;
alert(msg+"\nPress Enter twice to close this window")
}
-->
</script>
</head>
<body bottommargin=150>
<p>Source object:
<input id="sourceObject" size=50 value="The text to Drag" onDragEnd="function1()">
<br>
</p>
<p>Drop selected text into the following text field.</p>
Target object:
<input id="targetObject" size=50 value="Drag destination element">
</body>
</html>
"onDragEnd" is applied to
+----------------+--------------------------------------------------------------+
| Applied_To |<a> <acronym> |
| |<address> <area> |
| |<b> <bdo> |
| |<big> <blockquote> |
| |<body> <button> |
| |<caption> <center> |
| |<cite> <code> |
| |<custom> <dd> |
| |<del> <dfn> |
| |<dir> <div> |
| |<dl> document |
| |<dt> <em> |
| |<fieldset> <font> |
| |<form> <hn> |
| |<hr> <i> |
| |<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"> |
| |<kbd> <label> |
| |<li> <listing> |
| |<map> <marquee> |
| |<menu> <nobr> |
| |<object> <ol> |
| |<option> <p> |
| |<pre> <q> |
| |<s> <samp> |
| |<select> <small> |
| |<span> <strike> |
| |<strong> <sub> |
| |<sup> <table> |
| |<tbody> <td> |
| |<textarea> <tr> |
| |<tt> <u> |
| |<ul> <var> |
| |<xmp> |
+----------------+--------------------------------------------------------------+
"onDragEnd" Properties
+----------------+--------------------------------------------------------------+
| Properties |altKey altLeft |
| |cancelBubble clientX |
| |clientY ctrlKey |
| |ctrlLeft dataTransfer |
| |offsetX offsetY |
| |returnValue screenX |
| |screenY shiftLeft |
| |srcElement type |
| |x y |
+----------------+--------------------------------------------------------------+
"onDragEnd" Syntax and Note
Note:
This event fires when a drag-and-drop operation ends.
For this event to fire, the object must support drag-and-drop.
Syntax: