在JavaScript中,是否有可能获取元素悬停在其上的所有元素的列表?我使用一个元素作为游标,并且当光标元素悬停在每个其他元素上时,我希望页面中的其他元素加下划线。获取特定元素下的所有元素
<div id="cursor">|----------|<br/>|----------|<br/>>I'm a spaceship!><br/>|----------|<br/>|----------|<br/></div>
<div id="hi">Try to select this text</div>
<p>I want to automatically highlight all elements that the cursor element hovers over.</p>
<p>Here's an element.<p>
我刚刚发现了一个类似的问题,但我不确定它是否是重复的:http://stackoverflow.com/questions/4230029/jquery-javascript-collision-detection – 2013-04-20 03:50:29