WEB开发网:<html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312">&l
赞助商链接
中资源
>> 最新文章
>> 赞助商
>> 热门文章
WEB开发网文章阅读

点击图片从而改变网页背景图片

作者:未知 文章来源:WEB开发网 更新时间:2008-1-8 10:56:55

<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" onClick="tile();event.cancelBubble=true">
      <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>

百度搜索中共有相关主题
[阅读:次] [返回上一页] [打 印]
  • 相关文章
  • 本类热门