title: how to loop on hrefs?
body: <p>I need to get some links from the following code. I managed to reach the <code>href</code> of the first one by using:</p>
  
  <pre class="lang-js prettyprint-override"><code>var link=doc.querySelector('#courses_menu &gt; ul &gt; li:nth-child(2) a');
  </code></pre>
  
  <p>Now I need all these <code>href</code>'s. With a loop maybe?</p>
  
  <p>Here is the source I need to work on:</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;ul class="tools-menu-ul"&gt;
    &lt;li class="tools-menu-back"&gt;&lt;a href="#main_menu" class="controls"&gt;back&lt;/a&gt;&lt;/li&gt;
       &lt;li&gt;&lt;a title="Neural Networks (Elective for MET)" href="Courses/CourseEdition.aspx?crsEdId=109"&gt; CSEN 1005&lt;/a&gt;&lt;/li&gt;
  
        &lt;li&gt;&lt;a title="Systems-on-a-Chip (Elective for MET)" href="Courses/CourseEdition.aspx?crsEdId=111"&gt;ELCT 1002 &lt;/a&gt;&lt;/li&gt;
  
        &lt;li&gt;&lt;a title="Seminar on Self Reference" href="Courses/CourseEdition.aspx?crsEdId=115"&gt; CSEN 1009&lt;/a&gt;&lt;/li&gt;
  
        &lt;li&gt;&lt;a title="Seminar on Handheld Augmented Reality" href="Courses/CourseEdition.aspx? crsEdId=120"&gt; DMET 1011 &lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>