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);
}
查看全文
相关阅读:
CSS color
Python 集成开发环境(IDE)
Flexible and Economical UTF-8 Decoder
方程式组织EQUATION DRUG平台解析(提纲) —方程式组织系列分析报告之四
Windows Server 2008 IE 无法调整安全级别
蟑螂数据库
MySQL OCP
TCP协议疑难杂症全景解析
数据库资源博客---小麦苗BEST
C++并发实战 与多线程
原文地址:https://www.cnblogs.com/oldhorse/p/885217.html
最新文章
Hibernate关联关系映射
Android Studio中使用Gradle打包
android点滴之标准SD卡状态变化事件广播接收者的注冊
【DB】HBase的基本概念
Spring面试,IoC和AOP的理解
Jupiter Code Review Reference -- Jupiter代码审查工具使用参考
详解设备PID和VID
Qt数据库之数据库连接池
linux下插入U盘自动挂载后,用C获取其挂载点(cat /proc/mounts)
C# 系统应用之通过注册表获取USB使用记录(一)
热门文章
C#实现读取指定盘符硬盘序列号的方法
libusb获取usb设备的idVendor(vid),idProduct(pid),以及Serial Number
libusb开发者指南
HTML 5 Canvas vs. SVG
在Linux最大打开文件数限制下 MySQL 对参数的调整
瞬发大量并发连接 造成MySQL连接不响应的分析
安全搜索引擎Shodan(搜蛋)命令行模式使用TIPS
An Introduction to Reflection in C++
Google开源基于Tensorflow的NLP框架重大升级
Data-structures-and-algorithms-interview-questions-and-their-solutions
Copyright © 2011-2022 走看看