日期:2014-05-16 浏览次数:20594 次
<script language="javascript">
//匿名函数
function $(id){
return document.getElementById(id);
}
//页面加载
var img = new Array(46);
var adverTop;
var adverLeft;
var adverObj;
function jiazai(){
adverObj=$("adver");
if(adverObj.currentStyle){
adverTop = parseInt(adverObj.currentStyle.top);
adverLeft = parseInt(adverObj.currentStyle.left);
}
else{
adverTop = parseInt(document.defaultView.getComputedStyle(adverObj,null).top);
adverLeft = parseInt(document.defaultView.getComputedStyle(adverObj,null).left);
}
}
//随鼠标滚动的广告图片
function moves(){
adverObj.style.top=adverTop+parseInt(document.documentElement.scrollTop)+"px";
adverObj.style.left=adverLeft+parseInt(document.documentElement.scrollLeft)+"px";
}
window.onload = jiazai;
window.onscroll=moves;
//关闭广告
function clo(){
$("adver").style.display = "none";
}
</script>
</head>
<body>
<div id="adver"><img src="images/10.bmp" /><img src="images/button.jpg" id="closes" onclick="clo()" /></div>
</body>
</html>
<img src="图片.gif" border="0" usemap="#Map" />
<map name="Map" id="Map">
<area shape="rect" coords="753,162,797,179" id="area1" onclick="func1()" />
<area shape="rect" coords="746,216,773,231" id="area2" onclick="func2()" />