请教一个鼠标效果代码 如图所示,我想请教一下,如何实现 鼠标放在左边 1-4上后,分别在右边空白处显示不同的图片呢?这段代码该怎么写? 谢谢 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 可以用js来做,以下是两个例子鼠标经过时改变颜色 <script language="JavaScript1.2">function changeto(highlightcolor){source=event.srcElementif (source.tagName=="TR"||source.tagName=="TABLE")returnwhile(source.tagName!="TD")source=source.parentElementif (source.style.backgroundColor!=highlightcolor&&source.id!="ignore")source.style.backgroundColor=highlightcolor}function changeback(originalcolor){if (event.fromElement.contains(event.toElement)||source.contains(event.toElement)||source.id=="ignore")returnif (event.toElement!=source)source.style.backgroundColor=originalcolor}</script><!--以下是你代码是用来触发事件的,也是改变颜色的地方--><table border="1" width="54%"> <tr onMouseover="changeto('#fff362')" onMouseout="changeback('white')"> <td width="100%"> </td> </tr> <tr onMouseover="changeto('#ff5525')" onMouseout="changeback('white')"> <td width="100%"> </td> </tr> <tr onMouseover="changeto('#ff2262')" onMouseout="changeback('white')"> <td width="100%"> </td> </tr></table> 鼠标驱动图片变化<SCRIPT language="JavaScript"><!-- Beginfunction movepic(img_name,img_src) {document[img_name].src=img_src;}// End --></SCRIPT><A HREF="http://wd365.nease.net" onmouseover="movepic('button','tp2.gif')" onmouseout="movepic('button','tp3.gif')"><IMG NAME="button" SRC="tp1.gif" ALT="Image"></A> split 用法问题啊!!高手求解释! 大虾帮帮忙 关于Struts2通配符 获取网页高度 对大块的数据怎么加密? 搞了一夜上,烦得很,可能是myeclipse的问题,大家帮我看看,谢谢了。 webgis做最优路径选择 jsp学习指导 刚学的struts,这.jsp文件总运行不起来!很郁闷!高手快帮我看看 “网络收藏夹”流程设计的思路通常是什么样的? 关于JSP和SQL Server的问题 關於jasperreport的detail band急問, 100分在線等, 希望好心人能盡快解答!
<script language="JavaScript1.2">
function changeto(highlightcolor){
source=event.srcElement
if (source.tagName=="TR"||source.tagName=="TABLE")
return
while(source.tagName!="TD")
source=source.parentElement
if (source.style.backgroundColor!=highlightcolor&&source.id!="ignore")
source.style.backgroundColor=highlightcolor
}function changeback(originalcolor){
if (event.fromElement.contains(event.toElement)||source.contains(event.toElement)||source.id=="ignore")
return
if (event.toElement!=source)
source.style.backgroundColor=originalcolor
}
</script><!--以下是你代码是用来触发事件的,也是改变颜色的地方-->
<table border="1" width="54%">
<tr onMouseover="changeto('#fff362')" onMouseout="changeback('white')">
<td width="100%"> </td>
</tr>
<tr onMouseover="changeto('#ff5525')" onMouseout="changeback('white')">
<td width="100%"> </td>
</tr>
<tr onMouseover="changeto('#ff2262')" onMouseout="changeback('white')">
<td width="100%"> </td>
</tr>
</table>
<!-- Begin
function movepic(img_name,img_src) {
document[img_name].src=img_src;
}
// End -->
</SCRIPT>
<A HREF="http://wd365.nease.net"
onmouseover="movepic('button','tp2.gif')"
onmouseout="movepic('button','tp3.gif')">
<IMG NAME="button" SRC="tp1.gif" ALT="Image"></A>