进入页面的公告栏
[ 发布者:luwei┊来源:本站整理┊时间:2005-10-23┊浏览:
人次 ]
网页特效|Linkweb.cn/Js|---进入页面的公告栏请将此文件与网页文件保存在同目录下
var IE5=(document.getElementById && document.all)? true : false;
var W3C=(document.getElementById)? true: false;
var currIDb=null, currIDs=null, xoff=0, yoff=0; zctr=0; totz=0;
function trackmouse(evt){
if((currIDb!=null) && (currIDs!=null)){
var x=(IE5)? event.clientX+document.body.scrollLeft : evt.pageX;
var y=(IE5)? event.clientY+document.body.scrollTop : evt.pageY;
currIDb.style.left=x+xoff+'px';
currIDs.style.left=x+xoff+10+'px';
currIDb.style.top=y+yoff+'px';
currIDs.style.top=y+yoff+10+'px';
return false;
}}
function stopdrag(){
currIDb=null;
currIDs=null;
NS6bugfix();
}
function grab_id(evt){
xoff=parseInt(this.IDb.style.left)-((IE5)? event.clientX+document.body.scrollLeft : evt.pageX);
yoff=parseInt(this.IDb.style.top)-((IE5)? event.clientY+document.body.scrollTop : evt.pageY);
currIDb=this.IDb;
currIDs=this.IDs;
}
function NS6bugfix(){
if(!IE5){
self.resizeBy(0,1);
self.resizeBy(0,-1);
}}
function incrzindex(){
zctr=zctr+2;
this.subb.style.zIndex=zctr;
this.subs.style.zIndex=zctr-1;
}
function createPopup(id, title, width, height, x , y , isdraggable, boxcolor, barcolor, shadowcolor, text, textcolor, textptsize, textfamily ){
if(W3C){
zctr+=2;
totz=zctr;
var txt='';
txt+='
txt+='
txt+='
'+title+'
|
txt+='
document.write(txt);
this.IDh=document.getElementById(id+'_h');
this.IDh.IDb=document.getElementById(id+'_b');
this.IDh.IDs=document.getElementById(id+'_s');
this.IDh.IDb.subs=this.IDh.IDs;
this.IDh.IDb.subb=this.IDh.IDb;
this.IDh.IDb.IDov=document.getElementById(id+'_ov');
if(IE5){
this.IDh.IDb.IDov.style.width=width-6;
this.IDh.IDb.IDov.style.height=height-22;
this.IDh.IDb.IDov.style.scrollbarBaseColor=boxcolor;
this.IDh.IDb.IDov.style.overflow="auto";
}else{
this.IDh.IDs.style.MozOpacity=.5;
}
this.IDh.IDb.οnmοusedοwn=incrzindex;
if(isdraggable){
this.IDh.οnmοusedοwn=grab_id;
this.IDh.οnmοuseup=stopdrag;
}}}
if(W3C)document.οnmοusemοve=trackmouse;
if(!IE5 && W3C)window.οnlοad=NS6bugfix;
createPopup('box3','网页特效梦工厂' ,288, 90, 275, 155, true, 'FF8000' , '000000' , '800000' , '欢迎 欢迎 热烈欢迎' , 'FFFF00' , 9 , '宋体');
本类相关信息
改变IE滚动条的样式
雷达扫描效果
星空
去掉窗体滚动条的方法