自己选择背景图片
[html]----------------------------------------------------------------------------------------脚本说明:
把如下代码加入<body>区域中
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
if (navigator.appName == "Microsoft Internet Explorer") {
image_directory = "http://www.cn76.com/javascript/";
clear = new Image(); clear.src = image_directory + "clear.jpg";
pic1 = new Image(); pic1.src = image_directory + "chameleon.jpg";
pic2 = new Image(); pic2.src = image_directory + "gecko.jpg";
pic3 = new Image(); pic3.src = image_directory + "lizard.jpg";
pic4 = new Image(); pic4.src = image_directory + "toad.jpg";
}
function imagechange(imgName) {
if (navigator.appName == "Microsoft Internet Explorer") {
document.body.background = eval(imgName + ".src");
}
}
// End -->
</script>
<a href="default.htm" onMouseOver="imagechange('pic1');" onMouseOut="imagechange('clear');"><img src=http://www.sucai.com/texiaofile/"5.jpg"></a>
<a href="default.htm" onMouseOver="imagechange('pic2');" onMouseOut="imagechange('clear');"><img src=http://www.sucai.com/texiaofile/"0015.gif"></a>
<a href="default.htm" onMouseOver="imagechange('pic3');" onMouseOut="imagechange('clear');"><img src=http://www.sucai.com/texiaofile/"00012.gif"></a>
<a href="default.htm" onMouseOver="imagechange('pic4');" onMouseOut="imagechange('clear');"><img src=http://www.sucai.com/texiaofile/"tb3.jpg"></a>
- asp
- php
- Delphi
- Matlab
- JSP
- Foxpro
- JS
- C/C++
- C#/ASP.NET
- VC++
- JAVA
- VB
- 汇编语言
- html/css
- CGI
- XML/UML
- wap
- 网站相关
- 网页素材
- python
- 微信小程序
- thinkphp
- 如果你遇到编程学习难题:
访问www.zzzyk.com 试试
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,
部分文章来自网络,