我写了扩展到FF,这部分代码不适用于早期版本6.0-8.0。 但是在12.0-13.0版本中,一切都很棒。是什么原因?
for(var i = 0; i < doc.getElementsByClassName('repInfo').length; i++)
{
doc.getElementsByClassName('repInfo')[i].getElementsByTagName('a')[0].style.visibility = "hidden";
doc.getElementsByClassName('repInfo')[i].getElementsByTagName('a')[1].style.visibility = "hidden";
doc.getElementsByClassName('repInfo')[i].addEventListener('mouseleave',
function(e) {
e.target.getElementsByTagName('a')[0].style.visibility = "hidden";
e.target.getElementsByTagName('a')[1].style.visibility = "hidden";
}, false);
doc.getElementsByClassName('repInfo')[i].addEventListener('mouseenter',
function(e) {
e.target.getElementsByTagName('a')[0].style.visibility = "visible";
e.target.getElementsByTagName('a')[1].style.visibility = "visible";
}, false);
}