title: how do you reference this html object in javascript? applescript
body: <p>I want to reference these two buttons, but am unsure how to reference them to click them. </p>
  
  <p>I found this statement:</p>
  
  <p>do JavaScript <code>document.forms[0]['btnI'].click()</code> in front document</p>
  
  <p>and want to change it reference this:</p>
  
  <pre><code>&lt;li id="app_114228431971868" class="114228431971868"&gt;
    &lt;div&gt;
      &lt;img class="gameimg" src="http://photos-g.ak.fbcdn.net/photos-ak-snc1/v27562/200/114228431971868/app_1_114228431971868_5955.gif" width="75" height="75"&gt;
     &lt;/div&gt;
     &lt;p&gt;Knights of the Crystals&lt;/p&gt;
  &lt;/li&gt;
  </code></pre>
  
  <p>Then I want to add a second command to press this button:</p>
  
  <pre><code>&lt;div id="get-button"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>Then a third to reference this button:</p>
  
  <pre><code>&lt;img width="125" height="50" alt="Ready!" src="http://gffstatic.oneringgame.com/images/btn-ready.png" id="ggg-readybut" style="display: inline; "&gt;
  </code></pre>
  
  <p>I think you put the id where the btnI is in the javascript, but am unsure what to do for the other parts of the line. </p>