zoukankan
html css js c++ java
浮动广告代码(转)
var
brOK
=
false
;
var
mie
=
false
;
var
vmin
=
2
;
var
vmax
=
5
;
var
vr
=
1
;
var
timer1;
var
chinazads;
var
isflash
=
0
; file:
//
是否为FLASH文件的漂浮 1=是 0=否
var
pic
=
"
http://www.yj-studio.com/html/link/yj-studio.gif
"
; file:
//
图片的地址
var
alt
=
"
支持本站,请点击广告赞助商
"
; file:
//
鼠标放在图片上时显示的提示文字
var
url
=
"
../AJZ20.Web/WaitTransactMatter/ShowSMasterClew.aspx
"
; file:
//
图片链接的地址
var
flashurl
=
"
/AI/EQIFA.swf
"
; file:
//
FLASH文件的路径
var
Wimg
=
120
; file:
//
图像的宽度
var
Himg
=
120
; file:
//
图像的高度
function
movechip(chipname)
{
if
(brOK)
{
eval(
"
chip=
"
+
chipname);
if
(
!
mie)
{
pageX
=
window.pageXOffset;
pageW
=
window.innerWidth;
pageY
=
window.pageYOffset;
pageH
=
window.innerHeight;
}
else
{
pageX
=
window.document.body.scrollLeft
-
100
; file:
//
100数值修改,应该图片的大小加上浏览器边框,这样就能折回
pageW
=
window.document.body.offsetWidth
-
8
;
pageY
=
window.document.body.scrollTop;
pageH
=
window.document.body.offsetHeight;
}
chip.xx
=
chip.xx
+
chip.vx;
chip.yy
=
chip.yy
+
chip.vy;
chip.vx
+=
vr
*
(Math.random()
-
0.5
);
chip.vy
+=
vr
*
(Math.random()
-
0.5
);
if
(chip.vx
>
(vmax
+
vmin)) chip.vx
=
(vmax
+
vmin)
*
2
-
chip.vx;
if
(chip.vx
<
(
-
vmax
-
vmin)) chip.vx
=
(
-
vmax
-
vmin)
*
2
-
chip.vx;
if
(chip.vy
>
(vmax
+
vmin)) chip.vy
=
(vmax
+
vmin)
*
2
-
chip.vy;
if
(chip.vy
<
(
-
vmax
-
vmin)) chip.vy
=
(
-
vmax
-
vmin)
*
2
-
chip.vy;
if
(chip.xx
<=
pageX)
{
chip.xx
=
pageX;
chip.vx
=
vmin
+
vmax
*
Math.random();
}
if
(chip.xx
>=
pageX
+
pageW
-
chip.w)
{
chip.xx
=
pageX
+
pageW
-
chip.w;
chip.vx
=-
vmin
-
vmax
*
Math.random();
}
if
(chip.xx
>=
680
)
{
chip.xx
=
chip.xx
-
20
;
chip.vx
=-
vmin
-
vmax
*
Math.random();
}
if
(chip.yy
<=
pageY)
{
chip.yy
=
pageY;
chip.vy
=
vmin
+
vmax
*
Math.random();
}
if
(chip.yy
>=
pageY
+
pageH
-
chip.h)
{
chip.yy
=
pageY
+
pageH
-
chip.h;
chip.vy
=-
vmin
-
vmax
*
Math.random();
}
if
(
!
mie)
{
eval('document.'
+
chip.named
+
'.top
=
'
+
chip.yy);
eval('document.'
+
chip.named
+
'.left
=
'
+
chip.xx);
}
else
{
eval('document.all.'
+
chip.named
+
'.style.pixelLeft
=
'
+
chip.xx);
eval('document.all.'
+
chip.named
+
'.style.pixelTop
=
'
+
chip.yy);
}
chip.timer1
=
setTimeout(
"
movechip('
"
+
chip.named
+
"
')
"
,
80
);
}
}
function
stopme(chipname)
{
if
(brOK)
{
eval(
"
chip=
"
+
chipname);
if
(chip.timer1
!=
null
)
{
clearTimeout(chip.timer1)
}
}
}
function
chinazads()
{
if
(navigator.appName.indexOf(
"
Internet Explorer
"
)
!=-
1
)
{
if
(parseInt(navigator.appVersion.substring(
0
,
1
))
>=
4
) brOK
=
navigator.javaEnabled();mie
=
true
;
}
if
(navigator.appName.indexOf(
"
Netscape
"
)
!=-
1
)
{
if
(parseInt(navigator.appVersion.substring(
0
,
1
))
>=
4
) brOK
=
navigator.javaEnabled();
}
chinazads.named
=
"
chinazads
"
;
chinazads.vx
=
vmin
+
vmax
*
Math.random();
chinazads.vy
=
vmin
+
vmax
*
Math.random();
chinazads.w
=
1
;
chinazads.h
=
1
;
chinazads.xx
=
0
;
chinazads.yy
=
0
;
chinazads.timer1
=
null
;
movechip(
"
chinazads
"
);
}
document.write('
<
div id
=
"
chinazads
"
style
=
"
height:49px;left:178px;position:absolute;top:1237px;70px; z-index:1000
"
>
');
if
(isflash
>
0
)
{
document.write(
"
<EMBED src='
"
+
flashurl
+
"
' quality=high WIDTH='
"
+
Wimg
+
"
' HEIGHT='
"
+
Himg
+
"
' TYPE='application/x-shockwave-flash'></EMBED>
"
);
}
else
{
//
document.write("<a href='" + url + "' target=_blank onmouseover=stopme('chinazads'); onmouseout=movechip('chinazads');>");
//
document.write("<img src='" + pic + "' alt='" + alt + "' border=0 width='" + Wimg + "' height='" + Himg + "' ></a>");
document.write(
"
<img src='
"
+
pic
+
"
' alt='
"
+
alt
+
"
' onclick='OpenShowPage();'border=0 width='
"
+
Wimg
+
"
' height='
"
+
Himg
+
"
' style='CURSOR: hand' onmouseover=stopme('chinazads'); onmouseout=movechip('chinazads');>
"
);
}
document.write(
"
</div>
"
);
chinazads();
function
OpenShowPage()
{
var
nLeft
=
300
;
var
nTop
=
300
;
var
sFeatures
=
'left
=
'
+
nLeft
+
',top
=
'
+
nTop
+
',height
=
'
+
(window.screen.availHeight
-
850
)
+
',width
=
'
+
(window.screen.availWidth
-
700
)
+
',help
=
no,status
=
no,toolbar
=
no,directories
=
no,resizable
=
yes,location
=
no,menubar
=
no,scrollbars
=
yes';
var
oWin
=
window.open(
"
../AJZ20.Web/WaitTransactMatter/ShowSMasterClew.aspx
"
,'',sFeatures);
}
查看全文
相关阅读:
设计模式——简单工厂模式
异常信息ASM ClassReader failed to parse class file的问题解决
freemarker学习笔记
java实现邮箱验证的功能
Quartz学习——Quartz简单入门Demo(二)
Quartz大致介绍(一)
深入理解Java线程池:ScheduledThreadPoolExecutor
抢火车票引发的思考
CGLib动态代理引起的空指针异常
从原理上搞定编码(四)-- Base64编码
原文地址:https://www.cnblogs.com/oldhorse/p/885217.html
最新文章
PyCharm 2020.1 x64 专业版破解【亲测有效】
使用python 下载 mp4格式的腾讯视频
Python 拼接字符串的几种方式
Pycharm 专业版2018破解
Python 开发环境配置
数据库连接错误
Visual Studio 执行web程序时提示“无法启动IIS Express Web服务器“的解决方案
关于新博客的使用
C#下实现的K-Means优化[1]-「离群点检测」
C#下实现的基础K-MEANS多维聚类
热门文章
Python解析Wav文件并绘制波形的方法
Python下探究随机数的产生原理和算法
Python下图片的高斯模糊化的优化
Python下尝试实现图片的高斯模糊化
浅浅的分析LED呼吸灯的实现和PWM的关系
Python在七牛云平台的应用(三)简单的人脸识别
Python在七牛云平台的应用(二)图片瘦身
ssm集成redis
设计模式——抽象工厂模式
设计模式——工厂方法模式
Copyright © 2011-2022 走看看