poche 发表于 2007-4-27 10:29:35

***页面特效***重要信息说明脚本

把下列代码加到网页的<body></body>标签之间 从google下载我的照片管理软件

脚本说明:
第一步:把如下代码加入<body>区域中
<script language="javascript">
//显示的信息,可以使用html语法,注意引号用法,单套双。
var message='<b><font size=5 face=arial color=red><a href="http://vs_server.njcatv.net/bbs" target="_blank">请点击进入本站bbs</a></font></b>'

//背景色
var backgroundcolor="#eeffee"

//0 代表信息永远显示,1 代表信息只显示一段时间,2为随机显示模式;
var displaymode=1

//如果显示模式为在指定时间内显示,输入时间段(1000为1秒);
var displayduration=30000

//1代表闪烁,0代表不闪烁;
var flashmode=1
//如果设置了闪烁,输入闪烁的颜色;
var flashtocolor="lightgreen"

////下面不必修改///


function regenerate(){
window.location.reload()
}

var which=0

function regenerate2(){
if (document.layers)
settimeout("window.onresize=regenerate",400)
}


function display2(){
if (document.layers){
if (topmsg.visibility=="show")
topmsg.visibility="hide"
else
topmsg.visibility="show"
}
else if (document.all){
if (topmsg.style.visibility=="visible")
topmsg.style.visibility="hidden"
else
topmsg.style.visibility="visible"
settimeout("display2()",math.round(math.random()*10000)+10000)
}
}

function flash(){
if (which==0){
if (document.layers)
topmsg.bgcolor=flashtocolor
else
topmsg.style.backgroundcolor=flashtocolor
which=1
}
else{
if (document.layers)
topmsg.bgcolor=backgroundcolor
else
topmsg.style.backgroundcolor=backgroundcolor
which=0
}
}


if (document.all){
document.write('<span id="topmsg" style="position:absolute;visibility:hidden">'+message+'</span>')
}


function logoit(){
document.all.topmsg.style.left=document.body.scrollleft+document.body.clientwidth/2-document.all.topmsg.offsetwidth/2
document.all.topmsg.style.top=document.body.scrolltop+document.body.clientheight-document.all.topmsg.offsetheight-4
}


function logoit2(){
topmsg.left=pagexoffset+window.innerwidth/2-topmsg.document.width/2
topmsg.top=pageyoffset+window.innerheight-topmsg.document.height-5
settimeout("logoit2()",90)
}

function setmessage(){
document.all.topmsg.style.left=document.body.scrollleft+document.body.clientwidth/2-document.all.topmsg.offsetwidth/2
document.all.topmsg.style.top=document.body.scrolltop+document.body.clientheight-document.all.topmsg.offsetheight-4
document.all.topmsg.style.backgroundcolor=backgroundcolor
document.all.topmsg.style.visibility="visible"
if (displaymode==1)
settimeout("topmsg.style.visibility='hidden'",displayduration)
else if (displaymode==2)
display2()
if (flashmode==1)
setinterval("flash()",1000)
window.onscroll=logoit
window.onresize=new function("window.location.reload()")
}


function setmessage2(){
topmsg=new layer(window.innerwidth)
topmsg.bgcolor=backgroundcolor
regenerate2()
topmsg.document.write(message)
topmsg.document.close()
logoit2()
topmsg.visibility="show"
if (displaymode==1)
settimeout("topmsg.visibility='hide'",displayduration)
else if (displaymode==2)
display2()
if (flashmode==1)
setinterval("flash()",1000)
}


if (document.layers)
window.onload=setmessage2
else if (document.all)
window.onload=setmessage
</script>

      











------------------------- -------------

http: //w ww .huoyue.co m.cn 活跃网,活跃人群的论坛,访问活跃网 , 将给您带来意想不到的收 获,还可以免费为您开论坛,让您免费拥有与朋友、网友交流 的论坛。你是年轻人吗?你活跃你 就上!
页: [1]
查看完整版本: ***页面特效***重要信息说明脚本