点击改变网页图片背景
2008-05-01 06:09
387 查看
<html>
<head>
<title>Living Background</title>
</head>
<body bgcolor="#FFFFFF" leftmargin="0" marginwidth="0">
<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" onClick="tile();event.cancelBubble=true">
<img src="simple_images/alixixi.gif" height=96 width=96 border=2>
<img src="simple_images/logo.gif" height=96 width=96 border=2><br>
<img src="simple_images/xml.gif" height=96 width=96 border=2>
<img src="simple_images/addnew.gif" height=96 width=96 border=2></span></p>
</td>
</tr>
</table>
</center>
</body>
</html>
<head>
<title>Living Background</title>
</head>
<body bgcolor="#FFFFFF" leftmargin="0" marginwidth="0">
<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" onClick="tile();event.cancelBubble=true">
<img src="simple_images/alixixi.gif" height=96 width=96 border=2>
<img src="simple_images/logo.gif" height=96 width=96 border=2><br>
<img src="simple_images/xml.gif" height=96 width=96 border=2>
<img src="simple_images/addnew.gif" height=96 width=96 border=2></span></p>
</td>
</tr>
</table>
</center>
</body>
</html>
相关文章推荐
- 如何让网页背景图片固定不变 不会随着网页的放大缩小而改变
- iOS 点击cell改变背景颜色或者图片&&cell中其他部分取消高亮显示
- 一款基于jquery的下拉点击改变背景图片
- js实现点击图片改变页面背景图的方法
- andoid点击按钮(ImageButton)时改变按钮的背景图片 SelectorDemo
- css实现网页背景图片位置不随滚动条改变
- 点击图片改变背景的demo-学习第二天
- 网页中的:代码编写可变长宽的 框框 背景图片 制作 可变适应性的自动改变长和宽的
- LiseView GirdView点击改变背景图片或者背景色
- gallery中的子项在点击的时候改变子项的背景图片
- 点击li标记中的<a>标记改变li背景图片怎样实现
- 一款基于jquery的下拉点击改变背景图片
- js实现点击图片改变页面背景图的方法
- Android中GridView中Item点击背景图片的显示改变
- 超简短JS实现下拉菜单改变网页背景图片
- JS点击按钮如何改变网页的背景颜色
- 点击tableview里的cell后改变cell的背景图片
- JS操作CSS随机改变网页背景
- Jquery实现对a标签改变选中的背景色 支持多选 再次点击背景色消失
- iOS Tableview cell 上嵌套网页并且支持图片点击预览