js 判断鼠标点击的哪个元素》求:源码

2025-01-24 06:30:30
推荐回答(2个)
回答1:

function getTitle(title){
alert(title);
}
window.onload = function(){
var a = document.getElementsByTagName('a');
for(var i =0;i a[i].onclick = function(){
getTitle(this.title);
}
}
}