Getting an anchor value which is inside a li tag
<p>I have the this code:</p>

<pre><code>&lt;li class="email"&gt;
    &lt;a href="mailto:abc@gmail.com"&gt;abc@gmail.com&lt;/a&gt;
&lt;/li&gt;
</code></pre>

<p>I would like to get the <code>abc@gmail.com</code> using <strong>plain JavaScript</strong></p>

<p>I though of doing <code>document.getElementsByTagName("email")</code> which gives me the above, but I don't have an idea how to continue.</p>

<p>I have managed to find a solution with the help of the below answer by a user</p>

<pre><code>var elem = document.querySelectorAll('.email');
var email = elem[0].children[0].innerHTML;
</code></pre>
