社区
JavaScript
帖子详情
请问那里有新浪随滚动条滚动的广告源码?
blues7
2003-07-09 12:41:44
如提,谢谢
...全文
63
1
打赏
收藏
请问那里有新浪随滚动条滚动的广告源码?
如提,谢谢
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
1 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
seabell
2003-07-09
打赏
举报
回复
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
window.onerror = null;
var topMargin = 71;
var slideTime = 500;
var ns6 = (!document.all && document.getElementById);
var ie4 = (document.all);
var ns4 = (document.layers);
function layerObject(id,left) {
if (ns6) {
this.obj = document.getElementById(id).style;
this.obj.left = left;
return this.obj;
}
else if(ie4) {
this.obj = document.all[id].style;
this.obj.left = left-300;
return this.obj;
}
else if(ns4) {
this.obj = document.layers[id];
this.obj.left = left;
return this.obj;
}
}
function layerSetup() {
floatLyr = new layerObject('floatLayer', pageWidth * .5);
window.setInterval("main()", 10)
}
function floatObject() {
if (ns4 || ns6) {
findHt = window.innerHeight;
} else if(ie4) {
findHt = document.body.clientHeight;
}
}
function main() {
if (ns4) {
this.currentY = document.layers["floatLayer"].top;
this.scrollTop = window.pageYOffset;
mainTrigger();
}
else if(ns6) {
this.currentY = parseInt(document.getElementById('floatLayer').style.top);
this.scrollTop = scrollY;
mainTrigger();
} else if(ie4) {
this.currentY = floatLayer.style.pixelTop;
this.scrollTop = document.body.scrollTop;
mainTrigger();
}
}
function mainTrigger() {
var newTargetY = this.scrollTop + this.topMargin;
if ( this.currentY != newTargetY ) {
if ( newTargetY != this.targetY ) {
this.targetY = newTargetY;
floatStart();
}
animator();
}
}
function floatStart() {
var now = new Date();
this.A = this.targetY - this.currentY;
this.B = Math.PI / ( 2 * this.slideTime );
this.C = now.getTime();
if (Math.abs(this.A) > this.findHt) {
this.D = this.A > 0 ? this.targetY - this.findHt : this.targetY + this.findHt;
this.A = this.A > 0 ? this.findHt : -this.findHt;
}
else {
this.D = this.currentY;
}
}
function animator() {
var now = new Date();
var newY = this.A * Math.sin( this.B * ( now.getTime() - this.C ) ) + this.D;
newY = Math.round(newY);
if (( this.A > 0 && newY > this.currentY ) || ( this.A < 0 && newY < this.currentY )) {
if ( ie4 )document.all.floatLayer.style.pixelTop = newY;
if ( ns4 )document.layers["floatLayer"].top = newY;
if ( ns6 )document.getElementById('floatLayer').style.top = newY + "px";
}
}
function start() {
if(ns6||ns4) {
pageWidth = innerWidth;
pageHeight = innerHeight;
layerSetup();
floatObject();
}
else if(ie4) {
pageWidth = document.body.clientWidth;
pageHeight = document.body.clientHeight;
layerSetup();
floatObject();
}
}
// End -->
</script>
________________________
<body bgcolor="#FFFFFF" text="#000000" onLoad="start()">
<DIV id="floatLayer" style="position: absolute; height:89px; width:91px; left:51px; top:22px;z-index: 100; background-color: #00CCFF; layer-background-color: #00CCFF; border: 1px none #000000">
<!$MG_havereinder>
</DIV>
<p>dfdsfdf
<p>dfdsfdf<p>dfdsfdf<p>dfdsfdf<p>dfdsfdf<p>dfdsfdf<p>dfdsfdf<p>dfdsfdf
<p>dfdsfdf<p>dfdsfdf<p>dfdsfdf<p>dfdsfdf<p>dfdsfdf<p>dfdsfdf
<p>dfdsfdf<p>dfdsfdf<p>dfdsfdf<p>dfdsfdf
19款网站常见多图片自动轮播banner
源码
提供19款不同样式的网站多图片自动轮播Banner
源码
下载,包括定时
滚动
、三维空间前后替换等多种效果,适用于丰富网页设计。
分享网络收集100个常用的jquery特效和插件打包下载
提供100个常用的jQuery特效和插件打包下载,包括图片
滚动
、焦点图幻灯切换、图片自动切换、图片放大、LightBox等。
类似9158视频聊天室
源码
开发方案
类似
新浪
聊天室和呱呱聊天室,99CU等表现形式,聊天大厅和聊天房间可以自由切换。 2. 数据库最好使用MS SQL,程序代码模块化开发,有充分的扩展性以及接口,二次开发方便。 3. 通过IE浏览器,即时视频聊天,互动; 服务的网络宽带没有高要求,占用服务器的资源非常少,包括CPU、内存;可数十人(现在4个人同时视频,可以随时要扩充)。语音视频交流,数据传输采用P2P原理实现; 采用VC+
类似51vv视频聊天室方案建设
该博客介绍类似
新浪
、呱呱等视频聊天室的建设方案。采用MS SQL数据库,VC++开发,可通过IE浏览器视频聊天,占用资源少。阐述了主界面、窗口、麦克风和视频安装等各部分的设计,包括聊天页面、视频窗口、消息显示等功能,还提及聊天记录查看等内容。
JavaScript
87,988
社区成员
224,683
社区内容
发帖
与我相关
我的任务
JavaScript
Web 开发 JavaScript
复制链接
扫一扫
分享
社区描述
Web 开发 JavaScript
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章