设为首页
加入收藏
帮助中心
首页 | 红盾通告 | 信息中心 | ASP技术 | 数据库 | 网页设计 | 网管专栏 | OICQ攻略 | 墨客频道 | 网站运营 |
当前位置:首页 >> 网页设计 >> Javascript >> 正文
最新信息
·Javascript处理数字的几个…
·判断当前网页是否为本站页…
·鼠标指上图片替换后出现下…
·逍遥狼无图片智能圆角
·javascript获取当前网页文…
·用javascript获得地址栏参…
·JavaScript常用判断函数
·双击鼠标滚动屏幕的代码
·web应用漏洞扫描工具Jikto…
·常备JS操作
资料搜索
热点信息
·js获取图片尺寸
·怎么让弹出窗口最大化
·web应用漏洞扫描工具Jikto…
·判断radio多个单选按纽中是…
·如何用文字做一个只刷新验…
·防止F5刷新执行onunload事…
·Javascript获取IE浏览器窗…
·关闭IE时调用onbeforeunlo…
·js表单提交验证
·javascript获取当前网页文…
推荐信息
·显示日期方式
·添加到收藏夹
·终极应用--弹出的窗口之Co…
·防止被人frame
·web应用漏洞扫描工具Jikto…
·JavaScript常用的一些验证…
·关闭IE时调用onbeforeunlo…
·js表单提交验证
·自己综合其他资料写的一套…
·window.open具体参数


Google
 
提示特效打字效果
〖编辑:Cloudy | 浏览:人次〗

<html><head><title></title>

<script language=javaScript>
<!-- Beginning of JavaScript -

// CREDITS:
// PopupTicker describing all your links onmouseover by Urs Dudli and Peter Gehrig
// Copyright (c) 2000 Peter Gehrig and Urs Dudli. All rights reserved.
// Permission given to use the script provided that this notice remains as is.
// Additional scripts can be found at http://www.24fun.com.
// info@24fun.ch
// 8/1/2000

// IMPORTANT:
// If you add this script to a script-library or a script-archive
// you have to insert a link to http://www.24fun.com right into the webpage where the script
// will be displayed.

// CONFIGURATION:
// Go to http://www.24fun.com, open category 'text' and download the ZIP-file of this script
// containing the the script-file with step-by-step instructions for easy configuration.

// width of the ticker
var tickerwidth=120

// height of the ticker
var tickerheight=100

// distance from the messagetext to the tickermarrgin (pixels)
var tickerpadding=5

// borderwidth of the ticker (pixels)
var borderwidth=2

// font-family
var fnt="Verdana"

// font-size of the text
var fntsize=8

// font-size of the last letter of the ticker
var fntsizelastletter=8

// font-color of the text
var fntcolor="008800"

// font-color of the last letter of the ticker
var fntcolorlastletter="00AA00"

// font-weight. Set a value between 1 to 9 to adjust the boldness
var fntweight=3

// backgroundcolor
var backgroundcolor="CCFFCC"

// standstill between the messages (microseconds)
var standstill=2000

// speed (a higher value will slow down the ticker)
var speed=40

// horizontal distance from the textlink to the popupbox (pixels)
var xdistance=50

// vertical distance from the textlink to the popupbox (pixels)
var ydistance=20

// Do not edit the variables below
var timer
var topposition=0
var leftposition=0
var x,y
var i_substring=0
var i_presubstring=0
var i_message=0
var message
var messagecontent=""
var messagebackground=""
var messagepresubstring=""
var messageaftersubstring=""
fntweight=fntweight*100

function getmessagebackground() {
        messagebackground="<table border="+borderwidth+" width="+tickerwidth+" height="+tickerheight+" cellspacing=0 cellpadding=0><tr><td valign=top bgcolor='"+backgroundcolor+"'>"
        messagebackground+=" </td></tr></table>"
}

function getmessagecontent() {   
        messagecontent="<table border=0 cellspacing=0 cellpadding="+tickerpadding+" width="+tickerwidth+" height="+tickerheight+"><tr><td valign=top>"
        messagecontent+="<span style='position:relative; font-family:"+fnt+";color:"+fntcolor+";font-size:"+fntsize+"pt;font-weight:"+fntweight+"'>"   
        messagecontent+="<font color='"+fntcolor+"'>"
        messagecontent+=messagepresubstring
        messagecontent+="</font>"
        messagecontent+="</span>"
        messagecontent+="<span style='position:relative; font-family:"+fnt+";color:"+fntcolor+";font-size:"+fntsizelastletter+"pt;font-weight:900'>"   
        messagecontent+="<font color='"+fntcolorlastletter+"'>"
        messagecontent+=messageaftersubstring
        messagecontent+="</font>"
        messagecontent+="</span>"
        messagecontent+="</td></tr></table>"
}

function showticker() {
    if (i_substring<=message.length-1) {
            i_substring++
            i_presubstring=i_substring-1
            if (i_presubstring<0) {i_presubstring=0}
            messagepresubstring=message.substring(0,i_presubstring)
            messageaftersubstring=message.substring(i_presubstring,i_substring)
            getmessagecontent()
        if (document.all) {
            ticker.innerHTML=messagecontent
            timer=setTimeout("showticker()", speed)
        }
        if (document.layers) {
            document.ticker.document.write(messagecontent)
            document.ticker.document.close()
            timer=setTimeout("showticker()", speed)
        }
    }
    else {
        clearTimeout(timer)
    }
}

function hideticker() {
    clearTimeout(timer)
    i_substring=0
    i_presubstring=0
    if (document.all) {
        document.all.ticker.style.visibility="hidden"
        document.all.tickerbg.style.visibility="hidden"
    }
    if (document.layers) {
        document.ticker.visibility="hidden"
        document.tickerbg.visibility="hidden"
    }
}

function showmessage(linkmessage) {
    getmessagebackground()
    message=linkmessage
  
    i_substring=0
    i_presubstring=0
    leftposition=x+xdistance
    topposition=y+ydistance
    if (document.all) {   
        document.all.ticker.style.posLeft=leftposition
        document.all.ticker.style.posTop=topposition
        document.all.tickerbg.style.posLeft=leftposition
        document.all.tickerbg.style.posTop=topposition
        tickerbg.innerHTML=messagebackground
        document.all.ticker.style.visibility="visible"
        document.all.tickerbg.style.visibility="visible"
        showticker()
    }
    if (document.layers) {
        document.ticker.left=leftposition
        document.ticker.top=topposition
        document.tickerbg.left=leftposition
        document.tickerbg.top=topposition
        document.tickerbg.document.write(messagebackground)
        document.tickerbg.document.close()
        document.ticker.visibility="visible"
        document.tickerbg.visibility="visible"
        showticker()
    }
}

function handlerMM(e){
    x = (document.layers) ? e.pageX : document.body.scrollLeft+event.clientX
    y = (document.layers) ? e.pageY : document.body.scrollTop+event.clientY
}

if (document.layers){
    document.captureEvents(Event.MOUSEMOVE);
}
document.onmousemove = handlerMM;

// - End of JavaScript - -->
</script>

</head>
<body>
<DIV ID="tickerbg" style="position:absolute;"></DIV>
<DIV ID="ticker" style="position:absolute;"></DIV>

<a href="http://jojoo.net" onMouseOver="showmessage('欢迎来到jojoo.net')" onMouseOut="hideticker()">显示效果</a>

</body></html>

 


录入时间:2006-06-20 12:46:35 [打印本页] [关闭窗口] [返回顶部]
特别声明: 本站除部分特别声明禁止转载的专稿外的其他文章可以自由转载,但请务必注明出处和原始作者。文章版权归文章原始作者所有。对于被本站转载文章的个人和网站,我们表示深深的谢意。如果本站转载的文章有版权问题请联系编辑人员,我们尽快予以更正。

Copyright © 2006-2014 0733168.Com Inc All Rights Reserved
关于我们 | 广告合作 | 联系我们 | 法律声明 | 友情链接 | 意见反馈
本站所收录信息、社区话题、及本站所做之广告均属其个人行为,与本站立场无关
湘ICP备06008436号