title: How do I get the id of a clicked link and then style it in CSS
body: <p>How do I style a clicked link with CSS in JavaScript?</p>
  <p>Here is my link:</p>
  <pre><code>&lt;li&gt;&lt;id=&quot;106&quot; onClick=&quot;configurator(this)&quot; href=&quot;#&quot;&gt;10.6 &amp;micro;&lt;/a&gt;&lt;li&gt;
  </code></pre>
  <p>I am trying to run a function called <code>configurator</code> and return the ID of the this link so I can set the CSS.</p>
  <p>Help!  I am a JS newbie!</p>
  <p>Here is my function:</p>
  <pre><code>function configurator(clicked) {
   
   document.getElementById(clicked);
   alert(clicked.name);  
  }
  </code></pre>