点击图片从而改变网页背景图片
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>网页特效代码|JsCode.CN|---点击图片从而改变网页背景图片</title>
</head>
<body>
<script language="JavaScript1.2">
<!--
function tile(){
if (!document.all)
return
var source=event.srcElement
if (source.tagName=="IMG")
document.body.style.backgroundImage="url("+source.src+")"
}
function restore(){
document.body.style.backgroundImage=''
}
document.body.ondblclick=restore
-->
</script>
</p>
<p align="center"><span class="bgimages">
<img src="http://www.jscode.cn/images/IndexIron01.gif" height=96 width=96 border=2>
<img src="http://www.jscode.cn/images/IndexIron02.gif" height=96 width=96 border=2><br>
<img src="http://www.jscode.cn/images/IndexIron03.gif" height=96 width=96 border=2>
<img src="http://www.jscode.cn/images/IndexIron04.gif" height=96 width=96 border=2></span></p>
</td>
</tr>
</table>
</center>
</body>
</html>
- 最新文章
- 网页上漂浮的花瓣[01-12]
- 页面游动吐泡小鱼[01-12]
- 让页面不被别人放在框架中[01-12]
- 状态栏里显示动态欢迎语[01-12]
- 固定字号大小[01-12]
- 给页面加保护[01-12]
- 相关文章
