工作量统计:
本周进度条:
23+22+37+41+24+27+41+52+26+27+19+21=360 | 代码行数(JS) |
理解JS中‘点卡’切换特效,CSS特效,省份级联效果 |
知识点 |
漂浮的广告窗体:(IE)
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>滚动的广告条</title>
<script language="javascript">
var adverTop;/*层距页面端距离*/
var adverLeft;
var adverobject;
var closeobject;//层对象
function inix()
{
//获取层对象
adverobject=document.getElementById("adver");
closeobject=document.getElementById("closed");
//对于不同的浏览器获取不同的初始值
if(adverobject.currentStyle!=null)
{
adverTop=parseInt(adverobject.currentStyle.top);
adverLeft=parseInt(adverobject.currentStyle.left);
}
else
{
adverTop=parseInt(document.defaultView.getComputedStyle(adverobject,null).top);
adverLeft=parseInt(document.defaultView.getComputedStyle(adverobject,null).left);
}
}
function move()
{
adverobject.style.top=adverTop+parseInt(document.documentElement.scrollTop)+"px";
adverobject.style.left=adverLeft+parseInt(document.documentElement.scrollLeft)+"px";
closeobject.style.top=adverTop+parseInt(document.documentElement.scrollTop)+"px";
closeobject.style.left=adverLeft+parseInt(document.documentElement.scrollLeft)+"px";
}
function closeme()
{
closeobject.style.display="none";
adverobject.style.display="none";
}
window.onscroll=move;
window.onload=inix;
</script>
</head>
<body>
<div id="adver"><img src="Images/ADV.JPG" /></div>
<div id="main">
<img src="Images/MAIN1.JPG" />
<img src="Images/MAIN2.JPG" />
<img src="Images/MAIN3.JPG" />
</div>
<div id="closed" onclick="closeme()">关闭</div>
</body>
</html>