热门关键字:  PHP  Cisco  seo  网络广告 虚拟主机 中文域名
当前位置 :| 主页>网页特效>图形图象>

图片响应鼠标变换

来源: 作者: 时间:2005-12-31 点击:


<!-- 要实现此效果需要 2 个步骤: -->

<!-- 第 1 步: -->
<!-- 把<BODY>中的属性代码改为: -->

<BODY bgcolor="#fef4d9">



<!-- 第 2 步: -->
<!-- 把下面的代码加到<BODY></BODY>区域中: -->

<center>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
var rand1 = 0;
var useRand = 0;

images = new Array;
images[1] = new Image();
images[1].src = "images/webasp.net.1.jpg";
images[2] = new Image();
images[2].src = "images/webasp.net.2.jpg";
images[3] = new Image();
images[3].src = "images/webasp.net.3.jpg";
images[4] = new Image();
images[4].src = "images/webasp.net.4.jpg";


function swapPic() {
var imgnum = images.length - 1;
do {
var randnum = Math.random();
rand1 = Math.round((imgnum - 1) * randnum) + 1;
} while (rand1 == useRand);
useRand = rand1;
document.randimg.src = images[useRand].src;
}
// End -->
</script>
<a onClick="swapPic();"><img name="randimg" src="http://www.webasp.net/js/images/webasp.net.1.jpg"></a><br>
<font face="Verdana" size="-2">click image to change</font>
</center>


上一篇:图片大小变换
下一篇:图片自由运动
最新评论共有 0 位网友发表了评论
发表评论
评论内容:不能超过250字,需审核,请自觉遵守互联网相关政策法规。
用户名: 密码:
匿名?
注册
赞助商连接