title: How to add ondragstart="drag(event)" to a dynamically created elements (img div)?
body: <p>Examples:</p>
  
  <p>Image created dynamically:</p>
  
  <pre><code>var newImg = document.createElement('img');
  newImg.setAttribute('id', newimage);
  </code></pre>
  
  <p>How do you give this image the property "   ondragstart="drag(event)"   "?</p>
  
  <p>Thanks.</p>