底下分别是网页和两个js文件的源代码。<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <!-- saved from url=(0055)http://www.baron.com.cn/javascript/shu/20030818shu2.htm --> <HTML><HEAD><TITLE>鼠标上文字解释</TITLE> <STYLE type=text/css>BODY { MARGIN-TOP: 0px; FONT-SIZE: 9pt; MARGIN-LEFT: 0px; MARGIN-RIGHT: 0px; FONT-FAMILY: "宋体" } A { FONT-WEIGHT: 400; FONT-SIZE: 9pt; COLOR: black; TEXT-DECORATION: none } A:hover { FONT-WEIGHT: 400; FONT-SIZE: 9pt; COLOR: red; TEXT-DECORATION: underline } A:active { FONT: 9pt "宋体"; CURSOR: hand; COLOR: #ff0033 } </STYLE><META http-equiv=Content-Type content="text/html; charset=gb2312"> <META content="MSHTML 6.00.2800.1106" name=GENERATOR></HEAD> <BODY bgColor=#fef4d9><BR><BR> <CENTER><FONT face=隶书 color=red size=6>鼠标上文字解释</FONT></CENTER><BR> <CENTER> <TABLE borderColor=blue border=5 borderlight="green"> <TBODY> <TR> <TD align=middle><FONT face="Arial, Helvetica, sans-serif" color=red size=3><STRONG>下面为效果显示</STRONG></FONT></TD></TR> <TR> <TD align=middle width=400> <SCRIPT language=JavaScript1.2 src="鼠标上文字解释.files/main.js" type=text/javascript></SCRIPT> <DIV id=TipLayer style="Z-INDEX: 1000; VISIBILITY: hidden; POSITION: absolute; TOP: -100px"></DIV> <SCRIPT language=JavaScript1.2 src="鼠标上文字解释.files/style.js" type=text/javascript></SCRIPT> <P>You may set a <A onmouseover=stm(Text[14],Style[12]) onmouseout=htm() href="http://www.baron.com.cn/javascript/shu/20030818shu2.htm#">title</A> for your tip and you <A onmouseover=stm(Text[15],Style[12]) onmouseout=htm() href="http://www.baron.com.cn/javascript/shu/20030818shu2.htm#">may not</A>. You can position your tip as <A onmouseover=stm(Text[3],Style[12]) onmouseout=htm() href="http://www.baron.com.cn/javascript/shu/20030818shu2.htm#">Right</A> which is the default, or <A onmouseover=stm(Text[4],Style[1]) onmouseout=htm() href="http://www.baron.com.cn/javascript/shu/20030818shu2.htm#">center</A> or <A onmouseover=stm(Text[5],Style[2]) onmouseout=htm() href="http://www.baron.com.cn/javascript/shu/20030818shu2.htm#">left</A> or <A onmouseover=stm(Text[6],Style[3]) onmouseout=htm() href="http://www.baron.com.cn/javascript/shu/20030818shu2.htm#">float </A>or <A onmouseover=stm(Text[7],Style[4]) onmouseout=htm() href="http://www.baron.com.cn/javascript/shu/20030818shu2.htm#">fixed</A> (You many need to scroll up to see this). You also can make your tip <A onmouseover=stm(Text[8],Style[5]) onmouseout=htm() href="http://www.baron.com.cn/javascript/shu/20030818shu2.htm#">sticky</A> with a close link or <A onmouseover=stm(Text[9],Style[6]) onmouseout=htm() href="http://www.baron.com.cn/javascript/shu/20030818shu2.htm#">keep</A> it moving with the mouse around the page.<BR>You may also control the <A onmouseover=stm(Text[10],Style[7]) onmouseout=htm() href="http://www.baron.com.cn/javascript/shu/20030818shu2.htm#">left</A> and the <A onmouseover=stm(Text[11],Style[8]) onmouseout=htm() href="http://www.baron.com.cn/javascript/shu/20030818shu2.htm#">top</A> coordinates of the message from the mouse. You many also add <A onmouseover=stm(Text[12],Style[9]) onmouseout=htm() href="http://www.baron.com.cn/javascript/shu/20030818shu2.htm#">visual effects</A> to the tip message in MSIE 5.5 or later. You can change the <A onmouseover=stm(Text[13],Style[10]) onmouseout=htm() href="http://www.baron.com.cn/javascript/shu/20030818shu2.htm#">hole style</A> for every tip message by using different style arrays in the stm function. You also may insert <A onmouseover=stm(Text[16],Style[12]) onmouseout=htm() href="http://www.baron.com.cn/javascript/shu/20030818shu2.htm#">any html tags you want</A>.</P></TD></TR></TBODY></TABLE></CENTER><BR><BR><BR><BR><BR><BR><BR> <CENTER><TEXTAREA class=yk9 name=source rows=12 cols=45>脚本说明: 把如下代码加入<body>区域中 <SCRIPT language="JavaScript1.2" src="200308181/main.js"type="text/javascript"></SCRIPT> <DIV id="TipLayer" style="visibility:hidden;position:absolute;z-index:1000;top:-100"></DIV> <SCRIPT language="JavaScript1.2" src="200308181/style.js" type="text/javascript"></SCRIPT> <P>You may set a <A href="#" onMouseOver="stm(Text[14],Style[12])" onMouseOut="htm()">title</a> for your tip and you <A href="#" onMouseOver="stm(Text[15],Style[12])" onMouseOut="htm()">may not</a>. You can position your tip as <A href="#" onMouseOver="stm(Text[3],Style[12])" onMouseOut="htm()">Right</A> which is the default, or <A href="#" onMouseOut="htm()" onMouseOver="stm(Text[4],Style[1])">center</A> or <A href="#" onMouseOver="stm(Text[5],Style[2])" onmouseout="htm()">left</A> or <A href="#" onMouseOver="stm(Text[6],Style[3])" onMouseOut="htm()">float </A>or <A href="#" onMouseOver="stm(Text[7],Style[4])" onMouseOut="htm()">fixed</A> (You many need to scroll up to see this). You also can make your tip <A href="#" onMouseOver="stm(Text[8],Style[5])" onmouseout="htm()">sticky</A> with a close link or <A href="#" onMouseOver="stm(Text[9],Style[6])" onMouseOut="htm()">keep</A> it moving with the mouse around the page.<BR> You may also control the <A href="#" onMouseOut="htm()" onMouseOver="stm(Text[10],Style[7])">left</A> and the <A onMouseOver="stm(Text[11],Style[8])" href="#" onMouseOut="htm()">top</A> coordinates of the message from the mouse. You many also add <A href="#" onMouseOver="stm(Text[12],Style[9])" onmouseout="htm()">visual effects</A> to the tip message in MSIE 5.5 or later. You can change the <A href="#" onMouseOver="stm(Text[13],Style[10])" onMouseOut="htm()">hole style</A> for every tip message by using different style arrays in the stm function. You also may insert <A href="#" onMouseOver="stm(Text[16],Style[12])" onMouseOut="htm()"> any html tags you want</A>.</P> </TEXTAREA> <SCRIPT language=JavaScript><!-- hidefunction goHist(a) { history.go(a);}//--></SCRIPT>
下面是两个js文件的源代码 1.main.js <!-- /* Pleas leave this notice. DHTML tip message version 1.2 copyright Essam Gamal 2003 (http://migoicons.tripod.com, [email protected]) All modifications are done in the style.js you should not modify this file. Created on : 06/03/2003 Script featured on and can be found at Dynamic Drive (http://www.dynamicdrive.com) */ var ua = navigator.userAgent var ps = navigator.productSub var dom = (document.getElementById)? 1:0 var ie4 = (document.all&&!dom)? 1:0 var ie5 = (document.all&&dom)? 1:0 var nn4 =(navigator.appName.toLowerCase() == "netscape" && parseInt(navigator.appVersion) == 4) var nn6 = (dom&&!ie5)? 1:0 var sNav = (nn4||nn6||ie4||ie5)? 1:0 var cssFilters = ((ua.indexOf("MSIE 5.5")>=0||ua.indexOf("MSIE 6")>=0)&&ua.indexOf("Opera")<0)? 1:0 var Style=[],Text=[],Count=0,sbw=0,move=0,hs="",mx,my,scl,sct,ww,wh,obj,sl,st,ih,iw,vl,hl,sv,evlh,evlw,tbody var HideTip = "eval(obj+sv+hl+';'+obj+sl+'=0;'+obj+st+'=-800')" var doc_root = ((ie5&&ua.indexOf("Opera")<0||ie4)&&document.compatMode=="CSS1Compat")? "document.documentElement":"document.body" var PX = (nn6)? "px" :"" if(sNav) { window.onresize = ReloadTip document.onmousemove = MoveTip if(nn4) document.captureEvents(Event.MOUSEMOVE) } if(nn4||nn6) { mx = "e.pageX" my = "e.pageY" scl = "window.pageXOffset" sct = "window.pageYOffset" if(nn4) { obj = "document.TipLayer." sl = "left" st = "top" ih = "clip.height" iw = "clip.width" vl = "'show'" hl = "'hide'" sv = "visibility=" } else obj = "document.getElementById('TipLayer')." } if(ie4||ie5) { obj = "TipLayer." mx = "event.x" my = "event.y" scl = "eval(doc_root).scrollLeft" sct = "eval(doc_root).scrollTop" if(ie5) { mx = mx+"+"+scl my = my+"+"+sct } } if(ie4||dom){ sl = "style.left" st = "style.top" ih = "offsetHeight" iw = "offsetWidth" vl = "'visible'" hl = "'hidden'" sv = "style.visibility=" } if(ie4||ie5||ps>=20020823) { ww = "eval(doc_root).clientWidth" wh = "eval(doc_root).clientHeight" } else { ww = "window.innerWidth" wh = "window.innerHeight" evlh = eval(wh) evlw = eval(ww) sbw=15 } function applyCssFilter(){ if(cssFilters&&FiltersEnabled) { var dx = " progid:DXImageTransform.Microsoft." TipLayer.style.filter = "revealTrans()"+dx+"Fade(Overlap=1.00 enabled=0)"+dx+"Inset(enabled=0)"+dx+"Iris(irisstyle=PLUS,motion=in enabled=0)"+dx+"Iris(irisstyle=PLUS,motion=out enabled=0)"+dx+"Iris(irisstyle=DIAMOND,motion=in enabled=0)"+dx+"Iris(irisstyle=DIAMOND,motion=out enabled=0)"+dx+"Iris(irisstyle=CROSS,motion=in enabled=0)"+dx+"Iris(irisstyle=CROSS,motion=out enabled=0)"+dx+"Iris(irisstyle=STAR,motion=in enabled=0)"+dx+"Iris(irisstyle=STAR,motion=out enabled=0)"+dx+"RadialWipe(wipestyle=CLOCK enabled=0)"+dx+"RadialWipe(wipestyle=WEDGE enabled=0)"+dx+"RadialWipe(wipestyle=RADIAL enabled=0)"+dx+"Pixelate(MaxSquare=35,enabled=0)"+dx+"Slide(slidestyle=HIDE,Bands=25 enabled=0)"+dx+"Slide(slidestyle=PUSH,Bands=25 enabled=0)"+dx+"Slide(slidestyle=SWAP,Bands=25 enabled=0)"+dx+"Spiral(GridSizeX=16,GridSizeY=16 enabled=0)"+dx+"Stretch(stretchstyle=HIDE enabled=0)"+dx+"Stretch(stretchstyle=PUSH enabled=0)"+dx+"Stretch(stretchstyle=SPIN enabled=0)"+dx+"Wheel(spokes=16 enabled=0)"+dx+"GradientWipe(GradientSize=1.00,wipestyle=0,motion=forward enabled=0)"+dx+"GradientWipe(GradientSize=1.00,wipestyle=0,motion=reverse enabled=0)"+dx+"GradientWipe(GradientSize=1.00,wipestyle=1,motion=forward enabled=0)"+dx+"GradientWipe(GradientSize=1.00,wipestyle=1,motion=reverse enabled=0)"+dx+"Zigzag(GridSizeX=8,GridSizeY=8 enabled=0)"+dx+"Alpha(enabled=0)"+dx+"Dropshadow(OffX=3,OffY=3,Positive=true,enabled=0)"+dx+"Shadow(strength=3,direction=135,enabled=0)" } }function stm(t,s) { if(sNav) { if(t.length<2||s.length<25) { var ErrorNotice = "DHTML TIP MESSAGE VERSION 1.2 ERROR NOTICE.\n" if(t.length<2&&s.length<25) alert(ErrorNotice+"It looks like you removed an entry or more from the Style Array and Text Array of this tip.\nTheir should be 25 entries in every Style Array even though empty and 2 in every Text Array. You defined only "+s.length+" entries in the Style Array and "+t.length+" entry in the Text Array. This tip won't be viewed to avoid errors") else if(t.length<2) alert(ErrorNotice+"It looks like you removed an entry or more from the Text Array of this tip.\nTheir should be 2 entries in every Text Array. You defined only "+t.length+" entry. This tip won't be viewed to avoid errors.") else if(s.length<25) alert(ErrorNotice+"It looks like you removed an entry or more from the Style Array of this tip.\nTheir should be 25 entries in every Style Array even though empty. You defined only "+s.length+" entries. This tip won't be viewed to avoid errors.") } else { var ab = "" ;var ap = "" var titCol = (s[0])? "COLOR='"+s[0]+"'" : "" var txtCol = (s[1])? "COLOR='"+s[1]+"'" : "" var titBgCol = (s[2])? "BGCOLOR='"+s[2]+"'" : "" var txtBgCol = (s[3])? "BGCOLOR='"+s[3]+"'" : "" var titBgImg = (s[4])? "BACKGROUND='"+s[4]+"'" : "" var txtBgImg = (s[5])? "BACKGROUND='"+s[5]+"'" : "" var titTxtAli = (s[6] && s[6].toLowerCase()!="left")? "ALIGN='"+s[6]+"'" : "" var txtTxtAli = (s[7] && s[7].toLowerCase()!="left")? "ALIGN='"+s[7]+"'" : "" var add_height = (s[15])? "HEIGHT='"+s[15]+"'" : "" if(!s[8]) s[8] = "Verdana,Arial,Helvetica" if(!s[9]) s[9] = "Verdana,Arial,Helvetica" if(!s[12]) s[12] = 1 if(!s[13]) s[13] = 1 if(!s[14]) s[14] = 200 if(!s[16]) s[16] = 0 if(!s[17]) s[17] = 0 if(!s[18]) s[18] = 10 if(!s[19]) s[19] = 10 hs = s[11].toLowerCase() if(ps==20001108){ if(s[2]) ab="STYLE='border:"+s[16]+"px solid"+" "+s[2]+"'" ap="STYLE='padding:"+s[17]+"px "+s[17]+"px "+s[17]+"px "+s[17]+"px'"} var closeLink=(hs=="sticky")? "<TD ALIGN='right'><FONT SIZE='"+s[12]+"' FACE='"+s[8]+"'><A HREF='javascript:void(0)' ONCLICK='stickyhide()' STYLE='text-decoration:none;color:"+s[0]+"'><B>Close</B></A></FONT></TD>":"" var title=(t[0]||hs=="sticky")? "<TABLE WIDTH='100%' BORDER='0' CELLPADDING='0' CELLSPACING='0'><TR><TD "+titTxtAli+"><FONT SIZE='"+s[12]+"' FACE='"+s[8]+"' "+titCol+"><B>"+t[0]+"</B></FONT></TD>"+closeLink+"</TR></TABLE>" : "" var txt="<TABLE "+titBgImg+" "+ab+" WIDTH='"+s[14]+"' BORDER='0' CELLPADDING='"+s[16]+"' CELLSPACING='0' "+titBgCol+" ><TR><TD>"+title+"<TABLE WIDTH='100%' "+add_height+" BORDER='0' CELLPADDING='"+s[17]+"' CELLSPACING='0' "+txtBgCol+" "+txtBgImg+"><TR><TD "+txtTxtAli+" "+ap+" VALIGN='top'><FONT SIZE='"+s[13]+"' FACE='"+s[9]+"' "+txtCol +">"+t[1]+"</FONT></TD></TR></TABLE></TD></TR></TABLE>" if(nn4) { with(eval(obj+"document")) { open() write(txt) close() } } else eval(obj+"innerHTML=txt") tbody = { Pos:s[10].toLowerCase(), Xpos:s[18], Ypos:s[19], Transition:s[20], Duration:s[21], Alpha:s[22], ShadowType:s[23].toLowerCase(), ShadowColor:s[24], Width:parseInt(eval(obj+iw)+3+sbw) } if(ie4) { TipLayer.style.width = s[14] tbody.Width = s[14] } Count=0 move=1 } } }
function MoveTip(e) { if(move) { var X,Y,MouseX = eval(mx),MouseY = eval(my); tbody.Height = parseInt(eval(obj+ih)+3) tbody.wiw = parseInt(eval(ww+"+"+scl)); tbody.wih = parseInt(eval(wh+"+"+sct)) switch(tbody.Pos) { case "left" : X=MouseX-tbody.Width-tbody.Xpos; Y=MouseY+tbody.Ypos; break case "center": X=MouseX-(tbody.Width/2); Y=MouseY+tbody.Ypos; break case "float": X=tbody.Xpos+eval(scl); Y=tbody.Ypos+eval(sct); break case "fixed": X=tbody.Xpos; Y=tbody.Ypos; break default: X=MouseX+tbody.Xpos; Y=MouseY+tbody.Ypos } if(tbody.wiw<tbody.Width+X) X = tbody.wiw-tbody.Width if(tbody.wih<tbody.Height+Y+sbw) { if(tbody.Pos=="float"||tbody.Pos=="fixed") Y = tbody.wih-tbody.Height-sbw else Y = MouseY-tbody.Height } if(X<0) X=0 eval(obj+sl+"=X+PX;"+obj+st+"=Y+PX") ViewTip() } }function ViewTip() { Count++ if(Count == 1) { if(cssFilters&&FiltersEnabled) { for(Index=28; Index<31; Index++) { TipLayer.filters[Index].enabled = 0 } for(s=0; s<28; s++) { if(TipLayer.filters[s].status == 2) TipLayer.filters[s].stop() } if(tbody.Transition == 51) tbody.Transition = parseInt(Math.random()*50) var applyTrans = (tbody.Transition>-1&&tbody.Transition<24&&tbody.Duration>0)? 1:0 var advFilters = (tbody.Transition>23&&tbody.Transition<51&&tbody.Duration>0)? 1:0 var which = (applyTrans)?0:(advFilters)? tbody.Transition-23:0 if(tbody.Alpha>0&&tbody.Alpha<100) { TipLayer.filters[28].enabled = 1 TipLayer.filters[28].opacity = tbody.Alpha } if(tbody.ShadowColor&&tbody.ShadowType == "simple") { TipLayer.filters[29].enabled = 1 TipLayer.filters[29].color = tbody.ShadowColor } else if(tbody.ShadowColor&&tbody.ShadowType == "complex") { TipLayer.filters[30].enabled = 1 TipLayer.filters[30].color = tbody.ShadowColor } if(applyTrans||advFilters) { eval(obj+sv+hl) if(applyTrans) TipLayer.filters[0].transition = tbody.Transition TipLayer.filters[which].duration = tbody.Duration TipLayer.filters[which].apply() } } eval(obj+sv+vl) if(cssFilters&&FiltersEnabled&&(applyTrans||advFilters)) TipLayer.filters[which].play() if(hs == "sticky") move=0 } }function stickyhide() { eval(HideTip) }function ReloadTip() { if(nn4&&(evlw!=eval(ww)||evlh!=eval(wh))) location.reload() else if(hs == "sticky") eval(HideTip) }function htm() { if(sNav) { if(hs!="keep") { move=0; if(hs!="sticky") eval(HideTip) } } } //--> 2.style.js /* Please refer to readme.html for full InstructionsText[...]=[title,text]Style[...]=[TitleColor,TextColor,TitleBgColor,TextBgColor,TitleBgImag,TextBgImag,TitleTextAlign,TextTextAlign, TitleFontFace, TextFontFace, TipPosition, StickyStyle, TitleFontSize, TextFontSize, Width, Height, BorderSize, PadTextArea, CoordinateX , CoordinateY, TransitionNumber, TransitionDuration, TransparencyLevel ,ShadowType, ShadowColor] */var FiltersEnabled = 1 // if your not going to use transitions or filters in any of the tips set this to 0Text[0]=["Me Email","Click here to send me an email "] Text[1]=["Home Page","Click here to go to my Web site."] Text[2]=["This is the title","Well How do you find this Tip message to be?"] Text[3]=["Right","This tip Is right positioned"] Text[4]=["Center","This tip Is center positioned"] Text[5]=["Left","This tip Is left positioned"] Text[6]=["Float","This tip Is float positioned at a (10,10) coordinate, It also floats with the scrollbars so it is always static"] Text[7]=["Fixed","This tip Is fixed positioned at a (1,1) coordinate"] Text[8]=["sticky style","This tip will sticky around<BR>This is useful when you want to insert a link like this <A href='http://migoicons.tripod.com'>Home Page</A>"] Text[9]=["keep style","This sticks around the mouse"] Text[10]=["Left coordinate control","This tip is right positioned with a 40 X coordinate "] Text[11]=["Top coordinate control","This tip is right positioned with a 50 Y coordinate"] Text[12]=["Visual effects","This tip has a Shadow and is Transparent a little and also has a random Transition applied to it "] Text[13]=["different style","Wow this is a new style and position! "] Text[14]=["This is The title","this is the text"] Text[15]=["","This is only text"] Text[16]=["","Some Lists <li>list one</li> <li>list two</li> <li>list three</li> <li>list four</li>"] Style[0]=["white","black","#000099","#E8E8FF","","","","","","","","","","",200,"",2,2,10,10,51,1,0,"",""] Style[1]=["white","black","#000099","#E8E8FF","","","","","","","center","","","",200,"",2,2,10,10,"","","","",""] Style[2]=["white","black","#000099","#E8E8FF","","","","","","","left","","","",200,"",2,2,10,10,"","","","",""] Style[3]=["white","black","#000099","#E8E8FF","","","","","","","float","","","",200,"",2,2,10,10,"","","","",""] Style[4]=["white","black","#000099","#E8E8FF","","","","","","","fixed","","","",200,"",2,2,1,1,"","","","",""] Style[5]=["white","black","#000099","#E8E8FF","","","","","","","","sticky","","",200,"",2,2,10,10,"","","","",""] Style[6]=["white","black","#000099","#E8E8FF","","","","","","","","keep","","",200,"",2,2,10,10,"","","","",""] Style[7]=["white","black","#000099","#E8E8FF","","","","","","","","","","",200,"",2,2,40,10,"","","","",""] Style[8]=["white","black","#000099","#E8E8FF","","","","","","","","","","",200,"",2,2,10,50,"","","","",""] Style[9]=["white","black","#000099","#E8E8FF","","","","","","","","","","",200,"",2,2,10,10,51,0.5,75,"simple","gray"] Style[10]=["white","black","black","white","","","right","","Impact","cursive","center","",3,5,200,150,5,20,10,0,50,1,80,"complex","gray"] Style[11]=["white","black","#000099","#E8E8FF","","","","","","","","","","",200,"",2,2,10,10,51,0.5,45,"simple","gray"] Style[12]=["white","black","#000099","#E8E8FF","","","","","","","","","","",200,"",2,2,10,10,"","","","",""]applyCssFilter()
<!-- saved from url=(0055)http://www.baron.com.cn/javascript/shu/20030818shu2.htm -->
<HTML><HEAD><TITLE>鼠标上文字解释</TITLE>
<STYLE type=text/css>BODY {
MARGIN-TOP: 0px; FONT-SIZE: 9pt; MARGIN-LEFT: 0px; MARGIN-RIGHT: 0px; FONT-FAMILY: "宋体"
}
A {
FONT-WEIGHT: 400; FONT-SIZE: 9pt; COLOR: black; TEXT-DECORATION: none
}
A:hover {
FONT-WEIGHT: 400; FONT-SIZE: 9pt; COLOR: red; TEXT-DECORATION: underline
}
A:active {
FONT: 9pt "宋体"; CURSOR: hand; COLOR: #ff0033
}
</STYLE><META http-equiv=Content-Type content="text/html; charset=gb2312">
<META content="MSHTML 6.00.2800.1106" name=GENERATOR></HEAD>
<BODY bgColor=#fef4d9><BR><BR>
<CENTER><FONT face=隶书 color=red size=6>鼠标上文字解释</FONT></CENTER><BR>
<CENTER>
<TABLE borderColor=blue border=5 borderlight="green">
<TBODY>
<TR>
<TD align=middle><FONT face="Arial, Helvetica, sans-serif" color=red
size=3><STRONG>下面为效果显示</STRONG></FONT></TD></TR>
<TR>
<TD align=middle width=400>
<SCRIPT language=JavaScript1.2 src="鼠标上文字解释.files/main.js"
type=text/javascript></SCRIPT> <DIV id=TipLayer
style="Z-INDEX: 1000; VISIBILITY: hidden; POSITION: absolute; TOP: -100px"></DIV>
<SCRIPT language=JavaScript1.2 src="鼠标上文字解释.files/style.js"
type=text/javascript></SCRIPT> <P>You may set a <A onmouseover=stm(Text[14],Style[12]) onmouseout=htm()
href="http://www.baron.com.cn/javascript/shu/20030818shu2.htm#">title</A>
for your tip and you <A onmouseover=stm(Text[15],Style[12])
onmouseout=htm()
href="http://www.baron.com.cn/javascript/shu/20030818shu2.htm#">may
not</A>. You can position your tip as <A
onmouseover=stm(Text[3],Style[12]) onmouseout=htm()
href="http://www.baron.com.cn/javascript/shu/20030818shu2.htm#">Right</A>
which is the default, or <A onmouseover=stm(Text[4],Style[1])
onmouseout=htm()
href="http://www.baron.com.cn/javascript/shu/20030818shu2.htm#">center</A>
or <A onmouseover=stm(Text[5],Style[2]) onmouseout=htm()
href="http://www.baron.com.cn/javascript/shu/20030818shu2.htm#">left</A>
or <A onmouseover=stm(Text[6],Style[3]) onmouseout=htm()
href="http://www.baron.com.cn/javascript/shu/20030818shu2.htm#">float
</A>or <A onmouseover=stm(Text[7],Style[4]) onmouseout=htm()
href="http://www.baron.com.cn/javascript/shu/20030818shu2.htm#">fixed</A>
(You many need to scroll up to see this). You also can make your tip <A
onmouseover=stm(Text[8],Style[5]) onmouseout=htm()
href="http://www.baron.com.cn/javascript/shu/20030818shu2.htm#">sticky</A>
with a close link or <A onmouseover=stm(Text[9],Style[6]) onmouseout=htm()
href="http://www.baron.com.cn/javascript/shu/20030818shu2.htm#">keep</A>
it moving with the mouse around the page.<BR>You may also control the <A
onmouseover=stm(Text[10],Style[7]) onmouseout=htm()
href="http://www.baron.com.cn/javascript/shu/20030818shu2.htm#">left</A>
and the <A onmouseover=stm(Text[11],Style[8]) onmouseout=htm()
href="http://www.baron.com.cn/javascript/shu/20030818shu2.htm#">top</A>
coordinates of the message from the mouse. You many also add <A
onmouseover=stm(Text[12],Style[9]) onmouseout=htm()
href="http://www.baron.com.cn/javascript/shu/20030818shu2.htm#">visual
effects</A> to the tip message in MSIE 5.5 or later. You can change the <A
onmouseover=stm(Text[13],Style[10]) onmouseout=htm()
href="http://www.baron.com.cn/javascript/shu/20030818shu2.htm#">hole
style</A> for every tip message by using different style arrays in the stm
function. You also may insert <A onmouseover=stm(Text[16],Style[12])
onmouseout=htm()
href="http://www.baron.com.cn/javascript/shu/20030818shu2.htm#">any html
tags you
want</A>.</P></TD></TR></TBODY></TABLE></CENTER><BR><BR><BR><BR><BR><BR><BR>
<CENTER><TEXTAREA class=yk9 name=source rows=12 cols=45>脚本说明:
把如下代码加入<body>区域中
<SCRIPT language="JavaScript1.2" src="200308181/main.js"type="text/javascript"></SCRIPT>
<DIV id="TipLayer" style="visibility:hidden;position:absolute;z-index:1000;top:-100"></DIV>
<SCRIPT language="JavaScript1.2" src="200308181/style.js" type="text/javascript"></SCRIPT>
<P>You may set a
<A href="#" onMouseOver="stm(Text[14],Style[12])" onMouseOut="htm()">title</a> for your tip and you
<A href="#" onMouseOver="stm(Text[15],Style[12])" onMouseOut="htm()">may not</a>. You can position your tip as <A href="#" onMouseOver="stm(Text[3],Style[12])" onMouseOut="htm()">Right</A> which is the default, or <A href="#" onMouseOut="htm()" onMouseOver="stm(Text[4],Style[1])">center</A> or <A href="#" onMouseOver="stm(Text[5],Style[2])" onmouseout="htm()">left</A> or
<A href="#" onMouseOver="stm(Text[6],Style[3])" onMouseOut="htm()">float </A>or
<A href="#" onMouseOver="stm(Text[7],Style[4])" onMouseOut="htm()">fixed</A> (You many need to scroll up to see this). You also
can make
your tip
<A href="#" onMouseOver="stm(Text[8],Style[5])" onmouseout="htm()">sticky</A>
with a close link or
<A href="#" onMouseOver="stm(Text[9],Style[6])" onMouseOut="htm()">keep</A> it moving with the mouse around the page.<BR>
You may also
control the <A href="#" onMouseOut="htm()" onMouseOver="stm(Text[10],Style[7])">left</A> and the <A onMouseOver="stm(Text[11],Style[8])" href="#" onMouseOut="htm()">top</A> coordinates of the message from the mouse. You many also
add
<A href="#" onMouseOver="stm(Text[12],Style[9])" onmouseout="htm()">visual effects</A> to the tip message in MSIE 5.5 or later.
You can change the
<A href="#" onMouseOver="stm(Text[13],Style[10])" onMouseOut="htm()">hole style</A> for every tip message
by using different style arrays in the stm function. You also may
insert <A href="#" onMouseOver="stm(Text[16],Style[12])" onMouseOut="htm()"> any html tags you want</A>.</P>
</TEXTAREA>
<SCRIPT language=JavaScript><!-- hidefunction goHist(a) { history.go(a);}//--></SCRIPT>
<FORM method=post><INPUT style="COLOR: rgb(255,255,255); BACKGROUND-COLOR: #8000ff" onclick=goHist(-1) type=button value=返回>
</FORM></CENTER><BR><BR></BODY></HTML>
1.main.js
<!--
/*
Pleas leave this notice.
DHTML tip message version 1.2 copyright Essam Gamal 2003 (http://migoicons.tripod.com, [email protected])
All modifications are done in the style.js you should not modify this file. Created on : 06/03/2003
Script featured on and can be found at Dynamic Drive (http://www.dynamicdrive.com)
*/ var ua = navigator.userAgent
var ps = navigator.productSub
var dom = (document.getElementById)? 1:0
var ie4 = (document.all&&!dom)? 1:0
var ie5 = (document.all&&dom)? 1:0
var nn4 =(navigator.appName.toLowerCase() == "netscape" && parseInt(navigator.appVersion) == 4)
var nn6 = (dom&&!ie5)? 1:0
var sNav = (nn4||nn6||ie4||ie5)? 1:0
var cssFilters = ((ua.indexOf("MSIE 5.5")>=0||ua.indexOf("MSIE 6")>=0)&&ua.indexOf("Opera")<0)? 1:0
var Style=[],Text=[],Count=0,sbw=0,move=0,hs="",mx,my,scl,sct,ww,wh,obj,sl,st,ih,iw,vl,hl,sv,evlh,evlw,tbody
var HideTip = "eval(obj+sv+hl+';'+obj+sl+'=0;'+obj+st+'=-800')"
var doc_root = ((ie5&&ua.indexOf("Opera")<0||ie4)&&document.compatMode=="CSS1Compat")? "document.documentElement":"document.body"
var PX = (nn6)? "px" :"" if(sNav) {
window.onresize = ReloadTip
document.onmousemove = MoveTip
if(nn4) document.captureEvents(Event.MOUSEMOVE)
}
if(nn4||nn6) {
mx = "e.pageX"
my = "e.pageY"
scl = "window.pageXOffset"
sct = "window.pageYOffset"
if(nn4) {
obj = "document.TipLayer."
sl = "left"
st = "top"
ih = "clip.height"
iw = "clip.width"
vl = "'show'"
hl = "'hide'"
sv = "visibility="
}
else obj = "document.getElementById('TipLayer')."
}
if(ie4||ie5) {
obj = "TipLayer."
mx = "event.x"
my = "event.y"
scl = "eval(doc_root).scrollLeft"
sct = "eval(doc_root).scrollTop"
if(ie5) {
mx = mx+"+"+scl
my = my+"+"+sct
}
}
if(ie4||dom){
sl = "style.left"
st = "style.top"
ih = "offsetHeight"
iw = "offsetWidth"
vl = "'visible'"
hl = "'hidden'"
sv = "style.visibility="
}
if(ie4||ie5||ps>=20020823) {
ww = "eval(doc_root).clientWidth"
wh = "eval(doc_root).clientHeight"
}
else {
ww = "window.innerWidth"
wh = "window.innerHeight"
evlh = eval(wh)
evlw = eval(ww)
sbw=15
} function applyCssFilter(){
if(cssFilters&&FiltersEnabled) {
var dx = " progid:DXImageTransform.Microsoft."
TipLayer.style.filter = "revealTrans()"+dx+"Fade(Overlap=1.00 enabled=0)"+dx+"Inset(enabled=0)"+dx+"Iris(irisstyle=PLUS,motion=in enabled=0)"+dx+"Iris(irisstyle=PLUS,motion=out enabled=0)"+dx+"Iris(irisstyle=DIAMOND,motion=in enabled=0)"+dx+"Iris(irisstyle=DIAMOND,motion=out enabled=0)"+dx+"Iris(irisstyle=CROSS,motion=in enabled=0)"+dx+"Iris(irisstyle=CROSS,motion=out enabled=0)"+dx+"Iris(irisstyle=STAR,motion=in enabled=0)"+dx+"Iris(irisstyle=STAR,motion=out enabled=0)"+dx+"RadialWipe(wipestyle=CLOCK enabled=0)"+dx+"RadialWipe(wipestyle=WEDGE enabled=0)"+dx+"RadialWipe(wipestyle=RADIAL enabled=0)"+dx+"Pixelate(MaxSquare=35,enabled=0)"+dx+"Slide(slidestyle=HIDE,Bands=25 enabled=0)"+dx+"Slide(slidestyle=PUSH,Bands=25 enabled=0)"+dx+"Slide(slidestyle=SWAP,Bands=25 enabled=0)"+dx+"Spiral(GridSizeX=16,GridSizeY=16 enabled=0)"+dx+"Stretch(stretchstyle=HIDE enabled=0)"+dx+"Stretch(stretchstyle=PUSH enabled=0)"+dx+"Stretch(stretchstyle=SPIN enabled=0)"+dx+"Wheel(spokes=16 enabled=0)"+dx+"GradientWipe(GradientSize=1.00,wipestyle=0,motion=forward enabled=0)"+dx+"GradientWipe(GradientSize=1.00,wipestyle=0,motion=reverse enabled=0)"+dx+"GradientWipe(GradientSize=1.00,wipestyle=1,motion=forward enabled=0)"+dx+"GradientWipe(GradientSize=1.00,wipestyle=1,motion=reverse enabled=0)"+dx+"Zigzag(GridSizeX=8,GridSizeY=8 enabled=0)"+dx+"Alpha(enabled=0)"+dx+"Dropshadow(OffX=3,OffY=3,Positive=true,enabled=0)"+dx+"Shadow(strength=3,direction=135,enabled=0)"
}
}function stm(t,s) {
if(sNav) {
if(t.length<2||s.length<25) {
var ErrorNotice = "DHTML TIP MESSAGE VERSION 1.2 ERROR NOTICE.\n"
if(t.length<2&&s.length<25) alert(ErrorNotice+"It looks like you removed an entry or more from the Style Array and Text Array of this tip.\nTheir should be 25 entries in every Style Array even though empty and 2 in every Text Array. You defined only "+s.length+" entries in the Style Array and "+t.length+" entry in the Text Array. This tip won't be viewed to avoid errors")
else if(t.length<2) alert(ErrorNotice+"It looks like you removed an entry or more from the Text Array of this tip.\nTheir should be 2 entries in every Text Array. You defined only "+t.length+" entry. This tip won't be viewed to avoid errors.")
else if(s.length<25) alert(ErrorNotice+"It looks like you removed an entry or more from the Style Array of this tip.\nTheir should be 25 entries in every Style Array even though empty. You defined only "+s.length+" entries. This tip won't be viewed to avoid errors.")
}
else {
var ab = "" ;var ap = ""
var titCol = (s[0])? "COLOR='"+s[0]+"'" : ""
var txtCol = (s[1])? "COLOR='"+s[1]+"'" : ""
var titBgCol = (s[2])? "BGCOLOR='"+s[2]+"'" : ""
var txtBgCol = (s[3])? "BGCOLOR='"+s[3]+"'" : ""
var titBgImg = (s[4])? "BACKGROUND='"+s[4]+"'" : ""
var txtBgImg = (s[5])? "BACKGROUND='"+s[5]+"'" : ""
var titTxtAli = (s[6] && s[6].toLowerCase()!="left")? "ALIGN='"+s[6]+"'" : ""
var txtTxtAli = (s[7] && s[7].toLowerCase()!="left")? "ALIGN='"+s[7]+"'" : ""
var add_height = (s[15])? "HEIGHT='"+s[15]+"'" : ""
if(!s[8]) s[8] = "Verdana,Arial,Helvetica"
if(!s[9]) s[9] = "Verdana,Arial,Helvetica"
if(!s[12]) s[12] = 1
if(!s[13]) s[13] = 1
if(!s[14]) s[14] = 200
if(!s[16]) s[16] = 0
if(!s[17]) s[17] = 0
if(!s[18]) s[18] = 10
if(!s[19]) s[19] = 10
hs = s[11].toLowerCase()
if(ps==20001108){
if(s[2]) ab="STYLE='border:"+s[16]+"px solid"+" "+s[2]+"'"
ap="STYLE='padding:"+s[17]+"px "+s[17]+"px "+s[17]+"px "+s[17]+"px'"}
var closeLink=(hs=="sticky")? "<TD ALIGN='right'><FONT SIZE='"+s[12]+"' FACE='"+s[8]+"'><A HREF='javascript:void(0)' ONCLICK='stickyhide()' STYLE='text-decoration:none;color:"+s[0]+"'><B>Close</B></A></FONT></TD>":""
var title=(t[0]||hs=="sticky")? "<TABLE WIDTH='100%' BORDER='0' CELLPADDING='0' CELLSPACING='0'><TR><TD "+titTxtAli+"><FONT SIZE='"+s[12]+"' FACE='"+s[8]+"' "+titCol+"><B>"+t[0]+"</B></FONT></TD>"+closeLink+"</TR></TABLE>" : ""
var txt="<TABLE "+titBgImg+" "+ab+" WIDTH='"+s[14]+"' BORDER='0' CELLPADDING='"+s[16]+"' CELLSPACING='0' "+titBgCol+" ><TR><TD>"+title+"<TABLE WIDTH='100%' "+add_height+" BORDER='0' CELLPADDING='"+s[17]+"' CELLSPACING='0' "+txtBgCol+" "+txtBgImg+"><TR><TD "+txtTxtAli+" "+ap+" VALIGN='top'><FONT SIZE='"+s[13]+"' FACE='"+s[9]+"' "+txtCol +">"+t[1]+"</FONT></TD></TR></TABLE></TD></TR></TABLE>"
if(nn4) {
with(eval(obj+"document")) {
open()
write(txt)
close()
}
}
else eval(obj+"innerHTML=txt")
tbody = {
Pos:s[10].toLowerCase(),
Xpos:s[18],
Ypos:s[19],
Transition:s[20],
Duration:s[21],
Alpha:s[22],
ShadowType:s[23].toLowerCase(),
ShadowColor:s[24],
Width:parseInt(eval(obj+iw)+3+sbw)
}
if(ie4) {
TipLayer.style.width = s[14]
tbody.Width = s[14]
}
Count=0
move=1
}
}
}
if(move) {
var X,Y,MouseX = eval(mx),MouseY = eval(my); tbody.Height = parseInt(eval(obj+ih)+3)
tbody.wiw = parseInt(eval(ww+"+"+scl)); tbody.wih = parseInt(eval(wh+"+"+sct))
switch(tbody.Pos) {
case "left" : X=MouseX-tbody.Width-tbody.Xpos; Y=MouseY+tbody.Ypos; break
case "center": X=MouseX-(tbody.Width/2); Y=MouseY+tbody.Ypos; break
case "float": X=tbody.Xpos+eval(scl); Y=tbody.Ypos+eval(sct); break
case "fixed": X=tbody.Xpos; Y=tbody.Ypos; break
default: X=MouseX+tbody.Xpos; Y=MouseY+tbody.Ypos
} if(tbody.wiw<tbody.Width+X) X = tbody.wiw-tbody.Width
if(tbody.wih<tbody.Height+Y+sbw) {
if(tbody.Pos=="float"||tbody.Pos=="fixed") Y = tbody.wih-tbody.Height-sbw
else Y = MouseY-tbody.Height
}
if(X<0) X=0
eval(obj+sl+"=X+PX;"+obj+st+"=Y+PX")
ViewTip()
}
}function ViewTip() {
Count++
if(Count == 1) {
if(cssFilters&&FiltersEnabled) {
for(Index=28; Index<31; Index++) { TipLayer.filters[Index].enabled = 0 }
for(s=0; s<28; s++) { if(TipLayer.filters[s].status == 2) TipLayer.filters[s].stop() }
if(tbody.Transition == 51) tbody.Transition = parseInt(Math.random()*50)
var applyTrans = (tbody.Transition>-1&&tbody.Transition<24&&tbody.Duration>0)? 1:0
var advFilters = (tbody.Transition>23&&tbody.Transition<51&&tbody.Duration>0)? 1:0
var which = (applyTrans)?0:(advFilters)? tbody.Transition-23:0
if(tbody.Alpha>0&&tbody.Alpha<100) {
TipLayer.filters[28].enabled = 1
TipLayer.filters[28].opacity = tbody.Alpha
}
if(tbody.ShadowColor&&tbody.ShadowType == "simple") {
TipLayer.filters[29].enabled = 1
TipLayer.filters[29].color = tbody.ShadowColor
}
else if(tbody.ShadowColor&&tbody.ShadowType == "complex") {
TipLayer.filters[30].enabled = 1
TipLayer.filters[30].color = tbody.ShadowColor
}
if(applyTrans||advFilters) {
eval(obj+sv+hl)
if(applyTrans) TipLayer.filters[0].transition = tbody.Transition
TipLayer.filters[which].duration = tbody.Duration
TipLayer.filters[which].apply()
}
}
eval(obj+sv+vl)
if(cssFilters&&FiltersEnabled&&(applyTrans||advFilters)) TipLayer.filters[which].play()
if(hs == "sticky") move=0
}
}function stickyhide() {
eval(HideTip)
}function ReloadTip() {
if(nn4&&(evlw!=eval(ww)||evlh!=eval(wh))) location.reload()
else if(hs == "sticky") eval(HideTip)
}function htm() {
if(sNav) {
if(hs!="keep") {
move=0;
if(hs!="sticky") eval(HideTip)
}
}
}
//-->
2.style.js
/*
Please refer to readme.html for full InstructionsText[...]=[title,text]Style[...]=[TitleColor,TextColor,TitleBgColor,TextBgColor,TitleBgImag,TextBgImag,TitleTextAlign,TextTextAlign, TitleFontFace, TextFontFace, TipPosition, StickyStyle, TitleFontSize, TextFontSize, Width, Height, BorderSize, PadTextArea, CoordinateX , CoordinateY, TransitionNumber, TransitionDuration, TransparencyLevel ,ShadowType, ShadowColor]
*/var FiltersEnabled = 1 // if your not going to use transitions or filters in any of the tips set this to 0Text[0]=["Me Email","Click here to send me an email "]
Text[1]=["Home Page","Click here to go to my Web site."]
Text[2]=["This is the title","Well How do you find this Tip message to be?"]
Text[3]=["Right","This tip Is right positioned"]
Text[4]=["Center","This tip Is center positioned"]
Text[5]=["Left","This tip Is left positioned"]
Text[6]=["Float","This tip Is float positioned at a (10,10) coordinate, It also floats with the scrollbars so it is always static"]
Text[7]=["Fixed","This tip Is fixed positioned at a (1,1) coordinate"]
Text[8]=["sticky style","This tip will sticky around<BR>This is useful when you want to insert a link like this <A href='http://migoicons.tripod.com'>Home Page</A>"]
Text[9]=["keep style","This sticks around the mouse"]
Text[10]=["Left coordinate control","This tip is right positioned with a 40 X coordinate "]
Text[11]=["Top coordinate control","This tip is right positioned with a 50 Y coordinate"]
Text[12]=["Visual effects","This tip has a Shadow and is Transparent a little and also has a random Transition applied to it "]
Text[13]=["different style","Wow this is a new style and position! "]
Text[14]=["This is The title","this is the text"]
Text[15]=["","This is only text"]
Text[16]=["","Some Lists <li>list one</li> <li>list two</li> <li>list three</li> <li>list four</li>"]
Style[0]=["white","black","#000099","#E8E8FF","","","","","","","","","","",200,"",2,2,10,10,51,1,0,"",""]
Style[1]=["white","black","#000099","#E8E8FF","","","","","","","center","","","",200,"",2,2,10,10,"","","","",""]
Style[2]=["white","black","#000099","#E8E8FF","","","","","","","left","","","",200,"",2,2,10,10,"","","","",""]
Style[3]=["white","black","#000099","#E8E8FF","","","","","","","float","","","",200,"",2,2,10,10,"","","","",""]
Style[4]=["white","black","#000099","#E8E8FF","","","","","","","fixed","","","",200,"",2,2,1,1,"","","","",""]
Style[5]=["white","black","#000099","#E8E8FF","","","","","","","","sticky","","",200,"",2,2,10,10,"","","","",""]
Style[6]=["white","black","#000099","#E8E8FF","","","","","","","","keep","","",200,"",2,2,10,10,"","","","",""]
Style[7]=["white","black","#000099","#E8E8FF","","","","","","","","","","",200,"",2,2,40,10,"","","","",""]
Style[8]=["white","black","#000099","#E8E8FF","","","","","","","","","","",200,"",2,2,10,50,"","","","",""]
Style[9]=["white","black","#000099","#E8E8FF","","","","","","","","","","",200,"",2,2,10,10,51,0.5,75,"simple","gray"]
Style[10]=["white","black","black","white","","","right","","Impact","cursive","center","",3,5,200,150,5,20,10,0,50,1,80,"complex","gray"]
Style[11]=["white","black","#000099","#E8E8FF","","","","","","","","","","",200,"",2,2,10,10,51,0.5,45,"simple","gray"]
Style[12]=["white","black","#000099","#E8E8FF","","","","","","","","","","",200,"",2,2,10,10,"","","","",""]applyCssFilter()