Answer the question
In order to leave comments, you need to log in
How to use javascript to determine the item's item that was clicked?
for example there is a code like this
<ul>
<li>
<li><a href="#">0</a></li>
<li><a href="#">1</a></li>
<li><a href="#">n</a></li>
</ul>
aa=document.getElementsByTagName("a");
function pla()
{
var i=aa.iteam();// вот тут и проблема не знаю как мне определить индекс текущего нажатого ссылка.
return alert(i);
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question