'onDragStart' Example : onDragStart « Event Handlers Reference « JavaScript Reference

'onDragStart' Example

<script language="JavaScript">
function function1() {
  msg = 'on' + event.type + ' event fired by ' + '"' + event.srcElement.id + '"'; 
  alert(msg+"\nPress Enter twice to close this window") 
<body bottommargin=150>
  <p>Source object: 
<input id="sourceObject" size=50 value="The text to Drag" ondragstart="function1()">
  <p>Drop selected text into the following text field.</p>
  Target object: 
<input id="targetObject" size=50 value="Drag destination element"> 


Related examples in the same category

1.'onDragStart' Syntax and Note
2.'onDragStart' Properties
3.'onDragStart' is applied to