title: How to change the innertext of an <a> tag in html
body: <p>Considering the following code:</p>
  
  <pre><code>&lt;li&gt;&lt;a href="#" id="vm1"&gt;LA1&lt;/a&gt;&lt;/li&gt;
  </code></pre>
  
  <p>It is in an html file and its innertext is LA1 as is shown above. Now I want to change the value of the innertext of the above  tag through the following code:</p>
  
  <pre><code>document.getElementById("vm1").innerHTML= "LA2";
  </code></pre>
  
  <p>It didn't work. I thought that it might be the browser I am utilizing (chrome) does not support innerHTML. So I tried an another way:</p>
  
  <pre><code>document.getElementById("vm1").innerText = "LA2"
  </code></pre>
  
  <p>It did not work either. So what should I to to set the innertext of an  tag through js.</p>