所以这是我的代码:
<th width="14%" height="63" scope="col">
<img
src="GFX/home-navi.fw.png"
width="140" height="63"
onmouseover="this.src='GFX/home-navi-mo.fw.png';" />
</th>
鼠标悬停在 Chrome 上完美运行,但在 IE 上不行。我该如何解决?
所以这是我的代码:
<th width="14%" height="63" scope="col">
<img
src="GFX/home-navi.fw.png"
width="140" height="63"
onmouseover="this.src='GFX/home-navi-mo.fw.png';" />
</th>
鼠标悬停在 Chrome 上完美运行,但在 IE 上不行。我该如何解决?
仅供参考:
无论如何,您都会尝试一下mouseenter:
The mouseenter JavaScript event is proprietary to Internet Explorer.
Because of the event's general utility,
jQuery simulates this event so that it can be used regardless of browser.
This event is sent to an element when the mouse pointer enters the element.
Any HTML element can receive this event.
但在我的 IE8 中,它的工作原理是这样的
<body>
<table>
<th width="14%" height="63" scope="col">
<img src="https://www.google.de/images/srpr/logo6w.png" width="100" height="50" onmouseover="this.src='http://gameplayer-magazine.de/WordPress/wp-content/gallery/google/google-2.jpg';">
</th>
</table>
</body>
也许您的资源不在线?
如果您告诉我们您可能使用哪个 IE 版本,我认为这将非常有帮助?
亲切地
尝试使用CSS
显示悬停效果:
<th width="14%" height="63" scope="col">
<img class="img" width="140" height="63"/>
</th>
<style>
.img
{
background:url(GFX/home-navi.fw.png);
}
.img:hover
{
background:url(GFX/home-navi-mo.fw.png);
}
</style>