title: javascript ~ turn a div into a button
body: <p>I am trying to get my code onto a page where I am not allowed a lot of changes; the person hosting the page allows me a <code>&lt;script&gt;</code> tag &amp; a <code>&lt;div&gt;</code>,  that's it.</p>
  
  <pre><code>--- page ---
  &lt;head&gt;
  &lt;script type='text/javascript' src='https://example.com/myJSfile.js'&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;div id='mydiv'&gt;&lt;/div&gt;
  &lt;/body&gt;
  ------------
  </code></pre>
  
  <p>When the page loads, how do I turn <code>mydiv</code> into a button, when I can only customize <code>myJSfile.js</code>?</p>
  
  <p>I cannot promise any typical libraries such as jQuery will be loaded for me,
  the host's site does load CSS, but I don't know the structure of their styles.  Maybe I will have to learn some of it at some point.</p>
  
  <p>If my code needs to load jQuery, I first have to check that it isn't already loaded.  How would you do that specifically that check?</p>
  
  <p>If I need to load my own css then I will have to do so dynamically using <code>myJSfile.js</code></p>
  
  <p><code>myJSfile.js</code> js file can be anything I need it to be.  I have full control over it.</p>
  
  <p>How would you go about this?</p>
  
  <p>Please remember that, besides <code>myJSfile.js</code>, I am pretty much locked out of anything on the page except the script &amp; div tags.</p>