title: A-frame : how to change image using javascript
body: <p>What JavaScript is needed to change the image? I can't work out how to target them:</p>
  
  <pre><code>&lt;a-scene stats&gt;
  &lt;a-sky src="../1/img/2.jpg"&gt;&lt;/a-sky&gt;
    &lt;a-assets&gt;
      &lt;img id="my-image" src="../1/img/bear.png" &gt;
      &lt;img id="bear2" src="../1/img/bear.png" &gt;
      &lt;img id="bear3" src="../1/img/bear.png" &gt;
    &lt;/a-assets&gt;
    &lt;!-- Using the asset management system. --&gt;
    &lt;a-image src="#my-image" width="10" height="10" position="-5 1 -7" rotation="0 10 0"&gt;&lt;/a-image&gt;
    &lt;a-image src="#bear2" width="10" height="10" position="5 1 -5" rotation="0 -60 0"&gt;&lt;/a-image&gt;
    &lt;a-image src="#bear3" width="150" height="150" position="-45 2 100"&gt;&lt;/a-image&gt;
    &lt;!-- Defining the URL inline. Not recommended but more comfortable for web developers.--&gt;
  </code></pre>