站长简介
网络文摘
友情链接
投稿荐稿信箱
谢谢支持

这是我从网上收集的一种激活图形的源代码,您可以加以发展并辅之变化,能够产生极负创意的效果

<script language="JavaScript"><!--
if (document.images) {
img1on = new Image();
img1on.src ="images/tv/my11.gif"; // Images1(交替图形1)
img2on = new Image();
img2on.src ="images/tv/my21.gif";
img3on = new Image();
img3on.src ="images/tv/my31.gif";
img4on = new Image();
img4on.src ="images/tv/my41.gif";
img5on = new Image();
img5on.src ="images/tv/my51.gif";
img1off = new Image();

img1off.src ="images/tv/my1.gif"; // Images2(交替图形2)
img2off = new Image();
img2off.src ="images/tv/my2.gif";
img3off = new Image();
img3off.src ="images/tv/my3.gif";
img4off = new Image();
img4off.src ="images/tv/my4.gif";
img5off = new Image();
img5off.src ="images/tv/my5.gif";
img1ls = new Image();

img1ls.src ="images/tv/active1.gif"; // Active Images(依次激活的图形)
img2ls = new Image();
img2ls.src ="images/tv/active2.gif";
img3ls = new Image();
img3ls.src ="images/tv/active3.gif";
img4ls = new Image();
img4ls.src ="images/tv/active4.gif";
img5ls = new Image();
img5ls.src ="images/tv/active5.gif";
}

// Function to 'activate' images.
function imgOn(imgName) {
if (document.images) {
document[imgName].src = eval(imgName + "on.src");
document["holder"].src = eval(imgName + "ls.src");
}
}

// Function to 'deactivate' images.
function imgOff(imgName) {
if (document.images) {
document[imgName].src = eval(imgName + "off.src");
document["holder"].src = "images/tv/center.gif";
}
}
// --></script>

 

<table border="0" cellpadding="0" cellspacing="0" width="100">
<tr>
<td width="21%"><table border="0" cellpadding="0" cellspacing="0" width="133">
<tr>
<td width="133"><img src="images/tv/up.gif" WIDTH="114" HEIGHT="12"></td>
</tr>
<tr>
<td align="left" noWrap width="133"><img src="images/tv/left.gif" width="13" height="68"><ahref="_private/resume.htm" onmouseout="imgOff('img1')" onmouseover="imgOn('img1')"><imgborder="0" name="holder" src="images/tv/center.gif" WIDTH="89" HEIGHT="68"></a><img
src="images/tv/right.gif" width="12" height="68"></td>
</tr>
<tr>
<td width="133"><img src="images/tv/down.gif" WIDTH="113" HEIGHT="41"></td>
</tr>
</table>

</td>
<td width="45%"><table border="0" cellpadding="0" cellspacing="0" width="122">
<tr>
<td align="center" vAlign="bottom" width="122"><a href="_private/resume.htm"onmouseout="imgOff('img1')" onmouseover="imgOn('img1')"><img alt="站长简介" border="0"
name="img1" src="images/tv/my1.gif" WIDTH="67" HEIGHT="21"><br>
<!-- 2nd Rollover -->
</a><a href="zzbj/lhdone.htm" onmouseout="imgOff('img2')" onmouseover="imgOn('img2')"><img
alt="网络文摘" border="0" name="img2" src="images/tv/my2.gif" WIDTH="67" HEIGHT="21"><br>
<!-- 3rd Rollover -->
</a><a href="friend.htm" onmouseout="imgOff('img3')" onmouseover="imgOn('img3')"><img
alt="友情链接" border="0" name="img3" src="images/tv/my3.gif" WIDTH="67" HEIGHT="21"><br>
<!-- 4th Rollover -->
</a><a href="mailto:[email protected]" onmouseout="imgOff('img4')"
onmouseover="imgOn('img4')"><img alt="投稿荐稿信箱" border="0" name="img4" src="images/tv/my4.gif" WIDTH="67" HEIGHT="21"><br>
<!-- 5th Rollover -->
</a><a href="http://netzone.swatou.com/netzone/bin/gosoo3.exe/pingjia?3154"
target="_blank" onmouseout="imgOff('img5')" onmouseover="imgOn('img5')"><img alt="谢谢支持" border="0" name="img5" src="images/tv/my5.gif" WIDTH="67" HEIGHT="21"></td>
</a>
</tr>

具体循环次数及图形定义可以自行设置。

返回