-3
rated 0 times
[
2]
[
5]
/ answers: 1 / hits: 104066
/ 14 Years ago, fri, february 25, 2011, 12:00:00
As a relative beginner with JS, I am struggling to try and find a solution to this.
I need to find out which line of an unordered list was clicked
<ul onclick=alert(this.clicked.line.id);>
<li id=l1>Line 1</li>
<li id=l2>Line 2</li>
<li id=l3>Line 3</li>
</ul>
I don't really want to add a onclick event to each individual line, I'm sure there must be a way ??
More From » html