Phiên bản đầy đủ: jsB@nk » Liên kết » Chú thích » Hộp thoại chú thích cho liên kết
URL: https://www.javascriptbank.com/popupticker-describing-all-your-links-onmouseover.html
Hiệu ứng tạo một hộp thoại chú thích cho liên kết khi ta rê con trỏ chuột đến liên kết và chữ trong hộp thoại này xuất hiện theo kiểu đánh máy-gõ từng kí tự.
Phiên bản đầy đủ: jsB@nk » Liên kết » Chú thích » Hộp thoại chú thích cho liên kết
URL: https://www.javascriptbank.com/popupticker-describing-all-your-links-onmouseover.html
<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.// width of the tickervar tickerwidth=120// height of the tickervar tickerheight=100// distance from the messagetext to the tickermarrgin (pixels)var tickerpadding=5// borderwidth of the ticker (pixels)var borderwidth=2// font-familyvar fnt="Verdana"// font-size of the textvar fntsize=8// font-size of the last letter of the tickervar fntsizelastletter=8// font-color of the textvar fntcolor="008800"// font-color of the last letter of the tickervar fntcolorlastletter="00AA00"// font-weight. Set a value between 1 to 9 to adjust the boldnessvar fntweight=3// backgroundcolorvar 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 belowvar timervar topposition=0var leftposition=0var x,yvar i_substring=0var i_presubstring=0var i_message=0var messagevar messagecontent=""var messagebackground=""var messagepresubstring=""var messageaftersubstring=""fntweight=fntweight*100function 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+=messagepresubstringmessagecontent+="</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+=messageaftersubstringmessagecontent+="</font>"messagecontent+="</span>"messagecontent+="</td></tr></table>"}function showticker() {if (i_substring<=message.length-1) {i_substring++i_presubstring=i_substring-1if (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=messagecontenttimer=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=0i_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=0i_presubstring=0 leftposition=x+xdistance topposition=y+ydistanceif (document.all) {document.all.ticker.style.posLeft=leftpositiondocument.all.ticker.style.posTop=toppositiondocument.all.tickerbg.style.posLeft=leftpositiondocument.all.tickerbg.style.posTop=toppositiontickerbg.innerHTML=messagebackground document.all.ticker.style.visibility="visible" document.all.tickerbg.style.visibility="visible"showticker()}if (document.layers) { document.ticker.left=leftpositiondocument.ticker.top=toppositiondocument.tickerbg.left=leftpositiondocument.tickerbg.top=toppositiondocument.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.clientXy = (document.layers) ? e.pageY : document.body.scrollTop+event.clientY}if (document.layers){document.captureEvents(Event.MOUSEMOVE);}document.onmousemove = handlerMM;// - End of JavaScript - --></SCRIPT><!-- This script downloaded from www.JavaScriptBank.com Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->
<DIV id=tickerbg style="POSITION: absolute"></DIV><DIV id=ticker style="POSITION: absolute"></DIV><BR><A href="http://JavaScriptBank.com" onmouseout=hideticker() onmouseover="showmessage('Download the free javascripts')" target=_blank>JavaScriptBank.com</A> | <A href="http://JavaScriptBank.com" onmouseout=hideticker() onmouseover="showmessage('Tooltip for Link example')" target=_blank>Link example #</A><!-- This script downloaded from www.JavaScriptBank.com Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->