分享

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

 荷花小女子 2011-03-19

点击图片从而改变网页背景图片 - 网页特效代码|:

<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./images/IndexIron01.gif" height=96 width=96 border=2>
      <img src="http://www./images/IndexIron02.gif" height=96 width=96 border=2><br>
      <img src="http://www./images/IndexIron03.gif" height=96 width=96 border=2>
      <img src="http://www./images/IndexIron04.gif" height=96 width=96 border=2></span></p>
    </td>
  </tr>
</table>
</center>
</body>
</html>

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约