FLASH游戏 | 站长工具 | 技术学院 忙鱼网 怕笑网 
积木网
浏览器 | 鼠标 | 状态栏 | 脚本 | 综合 | CSS | applet | 页面导航 | 页面背景 | 按钮特效 | 代码生成类 | 文字 | 时间日期 | 图形图象 | 网页
推荐: PHP5中文在线手册 | Smarty中文手册(模板引擎) | css2样式表中文手册 | ASP开发手册 | JScript开发手册
积木网 >> 特效代码 >> 鼠标

鼠标指向提示中有图片的网页特效代码

来源:互联摘选 日期:2004年04月08日 15:26:48
<script language=JavaScript> //***********默认设置定义.********************* tPopWait=10;//停留tWait豪秒后显示提示。 tPopShow=4000;//显示tShow豪秒后关闭提示 showPopStep=1; // 显示的距离 popOpacity=90; // 默认的透明度 //***************内部变量定义***************** sPop=null; curShow=null; tFadeOut=null; tFadeIn=null; tFadeWaiting=null; document.write("<style type='text/css'id='defaultPopStyle'>"); document.write(".cPopText { background-color: #CCCCFF;color:#FF5151; border: 1px #FF5151 solid;font-color: font-size: 12px; padding-right: 4px; padding-left: 4px; height: 20px; padding-top: 2px; padding-bottom: 2px; filter: Alpha(Opacity=0)}"); document.write("</style>"); document.write("<div id='dypopLayer' style='position:absolute;z-index:1000;' class='cPopText'></div>"); function showPopupText(){ var o=event.srcElement; MouseX=event.x; MouseY=event.y; if(o.alt!=null && o.alt!=""){o.dypop=o.alt;o.alt=""}; if(o.title!=null && o.title!=""){o.dypop=o.title;o.title=""}; if(o.dypop!=sPop) { sPop=o.dypop; clearTimeout(curShow); clearTimeout(tFadeOut); clearTimeout(tFadeIn); clearTimeout(tFadeWaiting); if(sPop==null || sPop=="") { dypopLayer.innerHTML=""; dypopLayer.style.filter="Alpha()"; dypopLayer.filters.Alpha.opacity=0; } else { if(o.dyclass!=null) popStyle=o.dyclass else popStyle="cPopText"; curShow=setTimeout("showIt()",tPopWait); } } } function showIt(){ dypopLayer.className=popStyle; dypopLayer.innerHTML=sPop; popWidth=dypopLayer.clientWidth; popHeight=dypopLayer.clientHeight; if(MouseX+12+popWidth>document.body.clientWidth) popLeftAdjust=-popWidth-24 else popLeftAdjust=0; if(MouseY+12+popHeight>document.body.clientHeight) popTopAdjust=-popHeight-24 else popTopAdjust=0; dypopLayer.style.left=MouseX+12+document.body.scrollLeft+popLeftAdjust; dypopLayer.style.top=MouseY+12+document.body.scrollTop+popTopAdjust; dypopLayer.style.filter="Alpha(Opacity=0)"; fadeOut(); } function fadeOut(){ if(dypopLayer.filters.Alpha.opacity<popOpacity) { dypopLayer.filters.Alpha.opacity+=showPopStep; tFadeOut=setTimeout("fadeOut()",1); } else { dypopLayer.filters.Alpha.opacity=popOpacity; tFadeWaiting=setTimeout("fadeIn()",tPopShow); } } function fadeIn(){ if(dypopLayer.filters.Alpha.opacity>0) { dypopLayer.filters.Alpha.opacity-=1; tFadeIn=setTimeout("fadeIn()",1); } } document.onmouseover=showPopupText; </script> <SCRIPT language=javascript> var currentpos,timer; function initialize() { timer=setInterval("scrollwindow()",20); } function sc(){ clearInterval(timer); } function scrollwindow() { currentpos=document.body.scrollTop; window.scroll(0,++currentpos); if (currentpos != document.body.scrollTop) sc(); } document.onmousedown=sc document.ondblclick=initialize </script> <a href="#" title="我要换行<BR>换行成功">鼠标</a><a href="#" title="我要换行<BR>换行成功<BR>我要插图<BR><img src=http://www.webjx.com/images/logo.gif><BR>插入成功">来这</a>
被阅读 0 次 本文现有评论 0
打印】 【收藏此页】 【关闭

强烈推荐

热门知识

最新文章

合作伙伴:网乐宽频 | 北京画廊
站长 服务邮箱:GimooHr(#)Gmail.Com 站长交流群:6412338 联系站长QQ号:36147437
Copyright © 2008 Gimoo.NetInc. all rights reserved 京ICP备05050695号