|
主题: 关于鼠标经过图片特效如何实现??
|
嬿嬿
职务:普通成员
等级:1
金币:0.0
发贴:66
|
#12006/5/18 0:25:27
http://product.pconline.com.cn/product/112/p112676.html上面的网页的图片效果是如何实现的?我把源文件弄过来修改后鼠标经过小图片,大图片就没变化了,请问该什么弄才能有这个效果?
编辑历史:[此帖最近一次被 嬿嬿 编辑过(编辑时间:2006-05-18 00:58:03)]
|
yiliaocheng
职务:普通成员
等级:2
金币:2.0
发贴:631
|
#22006/5/18 7:55:38
<img src="1.gif" name=face1 onmouseout="document.[face1].src=document.[face1].src;"> <img src="2.gif" name=face2 onmouseover="document.[face1].src=document.[face2].src;"> <img src="3.gif" name=face3 onmouseover="document.[face1].src=document.[face3].src;"> <img src="4.gif" name=face4 onmouseover="document.[face1].src=document.[face4].src;">
|
嬿嬿
职务:普通成员
等级:1
金币:0.0
发贴:66
|
#32006/5/18 23:54:10
不行啊,应该还有一段代码JS才行吧?
|
yiliaocheng
职务:普通成员
等级:2
金币:2.0
发贴:631
|
#42006/5/19 12:46:57
你再试试这个: <table> <SCRIPT LANGUAGE=javascript> <!-- viewArray = new Array(); viewArray[0] = new Image; viewArray[1] = new Image; viewArray[2] = new Image; viewArray[3] = new Image;
viewArray[0].src = "images/1.gif"; viewArray[1].src = "images/2.gif"; viewArray[2].src = "images/3.gif"; viewArray[3].src = "images/4.gif";
function changeView(x) { document.images["prodView"].src = viewArray[x].src; }//--> </SCRIPT> <tr align="left" bgcolor="#F8F8F8"> <td height="20" colspan="2"><A onMouseOver="changeView(0);" HREF="#"> <IMG HEIGHT=45 SRC="images/1.gif" WIDTH=60 BORDER=0 alt="图片一" id=prodView name=prodView></A></td> </tr> <tr align="left" bgcolor="#F8F8F8"> <td height="20" colspan="2"><A onMouseOver="changeView(1);" HREF="#"> <IMG HEIGHT=45 SRC="images/2.gif" WIDTH=60 BORDER=0 alt="图片二"></A></td> </tr> <tr align="left" bgcolor="#F8F8F8"> <td height="20" colspan="2"><A onMouseOver="changeView(2);" HREF="#"> <IMG HEIGHT=45 SRC="images/3.gif" WIDTH=60 BORDER=0 alt="图片三"></A></td> </tr> <tr align="left" bgcolor="#F8F8F8"> <td height="20" colspan="2"><A onMouseOver="changeView(3);" HREF="#"> <IMG HEIGHT=45 SRC="images/4.gif" WIDTH=60 BORDER=0 alt="图片四"></A></td> </tr> </table>
|