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);
}
查看全文
相关阅读:
JavaScript Array filter() 方法
Object.assign方法的使用入门
使用ES6新特性async await进行异步处理
win10系统怎么设置软件开机启动
【ES6学习笔记之】Object.assign()高级编程
如何使用闭包形成计数器
多次调用settimeout 如何使用单例模式
在线表单设计器现在已经开源
VisualStudio2017集成GitHub
PHP使用curl替代file_get_contents
原文地址:https://www.cnblogs.com/oldhorse/p/885217.html
最新文章
Gradle详解+Groovy
React Native学习笔记(1) 环境配置,项目结构,开发环境结构
Java中native关键字
JavaWeb的编码问题
ajax+springmvc返回中文乱码的解决办法
UML类图与类的关系详解
使用架构(XSD)验证XML文件
spring配置文件头部配置解析
spring MVC配置详解
Python 装饰器
热门文章
Python | 多种编码文件(中文)乱码问题解决
将指定目录中的txt文件转化成excel文件
python 读取文件时报错UnicodeDecodeError: 'gbk' codec can't decode byte 0x80 in position 205: illegal multibyte sequence
having 子句
(转)新手写爬虫v2.5(使用代理的异步爬虫)
python异步爬虫
反反爬虫转载
为何大量网站不能抓取?爬虫突破封禁的6种常见方法
爬虫下载百度贴吧图片
JS Proxy(代理)
Copyright © 2011-2022 走看看