JavaScript的广告图片 怎么在网页插入广告?代码要怎么写?比如我要在网页的左边显示一张图片 他会随着我的鼠标的滚动而滚动,怎么写?id什么的最好举个例子给我 谢谢 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <!doctype html><html> <head> <meta charset="gb2312" /> <style> body { height:1850px; } div { position:absolute; top:0px; left:0; } </style> </head> <body> <div id="test"> <img src="http://avatar.profile.csdn.net/0/1/6/2_nglwcm.jpg" /> </div> <script> function $(o){return document.getElementById(o)} window.onscroll = function(){ $('test').style.top = (document.documentElement.scrollTop || document.body.scrollTop) + 'px' } </script> </body></html>参考下 懒人图库上有一些:http://www.lanrentuku.com/js/duilian.html 用JS如何来做个重定向,望大哥们给个思路,有代码最好! struts的问题 那位老大帮我解决一个简单的问题? JS导出Excel问题,请广大高手指教 【JS求助】前段能都做出这个功能 求js仿select下拉列表代码 如何给这个进度条程序加一入口,让它真实地反应sample.htm页面的载入进度 页面刷新后列表框的值被置空了 如何实现让父窗口进行刷新? 如何用VML画线圆或弧等图形(用javascript语名多了太慢) 【分享】JavaScript版变速齿轮(纯JS/CSS实现) IE6和IE7js获取jquery的document对象
<!doctype html>
<html>
<head>
<meta charset="gb2312" />
<style>
body { height:1850px; }
div {
position:absolute; top:0px; left:0;
}
</style>
</head>
<body>
<div id="test">
<img src="http://avatar.profile.csdn.net/0/1/6/2_nglwcm.jpg" />
</div>
<script>
function $(o){return document.getElementById(o)}
window.onscroll = function(){
$('test').style.top = (document.documentElement.scrollTop || document.body.scrollTop) + 'px'
}
</script>
</body>
</html>参考下
http://www.lanrentuku.com/js/duilian.html