Javascript: How do I get the id of a clicked link and then style it in css

FritInent

New Member
How do I style a clicked link with CSS in Javascript?Here is my link:\[code\]<li><id="106" onClick="configurator(this)" href="http://stackoverflow.com/questions/4473385/#">10.6 &micro;</a><li>\[/code\]I am trying to run a function called configurator and return the ID of the this link so I can set the css.Help! I am a JS newbie!Here is my function:\[code\]function configurator(clicked) { document.getElementById(clicked); alert(clicked.name); }\[/code\]
 
Top