求助:图片上下随页面浮动 我要在页面两侧加上两个图片随网页上下浮动,要怎么实现?急 啊 !!求助各位高人!!!!! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <script>var obj1=null;var obj2=null;var ts;window.onload=Init;function Init(){ obj1=document.getElementById("div1"); obj2=document.getElementById("div2"); obj1.style.left=parseInt(document.body.clientWidth)-parseInt(obj1.offsetWidth)+"px";//居右 obj1.style.top=0; obj2.style.left=0; obj2.style.top=0; ts=setInterval(CheckPos,10); //控制位置函数}function CheckPos(){ obj1.style.top=document.body.scrollTop+"px"; obj2.style.top=document.body.scrollTop+"px";}</script><body><div id="div1" style="position:absolute;"> <img src="caribi.gif"/> </div><div id="div2" style="position:absolute;"> <img src="caribi.gif"/> </div><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/> <html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><title>侧边广告</title><script language="javascript">//设定相对位置imgleft=170;imgHeight=250;//图片移动函数function imgmove(){mylayer.style.top=document.body.scrollTop+document.body.offsetHeight-imgHeight;mylayer.style.left=document.body.offsetWidth-imgleft;mylayer1.style.top=document.body.scrollTop+document.body.offsetHeight-imgHeight;mylayer1.style.right=document.body.offsetWidth-imgleft;setTimeout("imgmove()",80);}</script></head><body onLoad="imgmove()"><h1> </h1><h1> </h1><h1> </h1><h1> </h1><h1> </h1><h1> </h1><h1> </h1><h1> </h1><h1> </h1><h1> </h1><h1> </h1><h1> </h1><center><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>www<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>www<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>www<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>www</center><div id="mylayer" style="position:absolute;width:64;top:300;hidden:visible;z-index:1; margin-left:20px;"><img src="http://www.phpfans.net/bbs/customavatars/2.jpg" width="100" height="120"></div><div id="mylayer1" style="position:absolute;width:64;top:300;hidden:visible;z-index:1; margin-right:20px"><img src="http://www.phpfans.net/bbs/customavatars/2.jpg" width="100" height="120"></div></body></html> 多参考Dom手册www.w3school.com.cn 求高手帮忙改一下这个“标签云”,谢谢 兄弟们,帮忙,很急 document.all.pw1.value= javascript 正则 把id="div"替换成 "" 简繁体两个问题,请教 问一个submit提交触发onsubmit事件的奇怪问题! 【鼠标事件监控的问题】 请教:如何向iframe中添加内容 急! 一个怪问题,急待解决。 javascript实现浏览到某一行文字时,文字从左滚动到中心 导出EXCEL出现了两个错误 163右上角翻页关闭代码演示
var obj1=null;
var obj2=null;
var ts;
window.onload=Init;
function Init()
{
obj1=document.getElementById("div1");
obj2=document.getElementById("div2");
obj1.style.left=parseInt(document.body.clientWidth)-parseInt(obj1.offsetWidth)+"px";//居右
obj1.style.top=0;
obj2.style.left=0;
obj2.style.top=0;
ts=setInterval(CheckPos,10); //控制位置函数
}
function CheckPos()
{
obj1.style.top=document.body.scrollTop+"px";
obj2.style.top=document.body.scrollTop+"px";
}
</script>
<body>
<div id="div1" style="position:absolute;">
<img src="caribi.gif"/> </div>
<div id="div2" style="position:absolute;">
<img src="caribi.gif"/> </div>
<br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>侧边广告</title>
<script language="javascript">
//设定相对位置
imgleft=170;
imgHeight=250;
//图片移动函数
function imgmove(){
mylayer.style.top=document.body.scrollTop+document.body.offsetHeight-imgHeight;
mylayer.style.left=document.body.offsetWidth-imgleft;
mylayer1.style.top=document.body.scrollTop+document.body.offsetHeight-imgHeight;
mylayer1.style.right=document.body.offsetWidth-imgleft;
setTimeout("imgmove()",80);
}
</script>
</head>
<body onLoad="imgmove()">
<h1> </h1>
<h1> </h1>
<h1> </h1>
<h1> </h1>
<h1> </h1>
<h1> </h1>
<h1> </h1>
<h1> </h1>
<h1> </h1>
<h1> </h1>
<h1> </h1>
<h1> </h1><center>
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>www
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>www
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>www<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>www</center>
<div id="mylayer" style="position:absolute;width:64;top:300;hidden:visible;z-index:1; margin-left:20px;"><img src="http://www.phpfans.net/bbs/customavatars/2.jpg" width="100" height="120"></div>
<div id="mylayer1" style="position:absolute;width:64;top:300;hidden:visible;z-index:1; margin-right:20px"><img src="http://www.phpfans.net/bbs/customavatars/2.jpg" width="100" height="120"></div>
</body>
</html>
www.w3school.com.cn