var elements = document.getElementsByTagName('a');
for(var i=0; i< elements.length; i++){
console.info(elements[i].getAttribute("title"));
}
javascript 获取网页上所有a href title
最新推荐文章于 2023-11-20 18:15:28 发布
var elements = document.getElementsByTagName('a');
for(var i=0; i< elements.length; i++){
console.info(elements[i].getAttribute("title"));
}