inicio mail me! sindicaci;ón

Collect carefully edition: Indispensable script code

One, a few very practical and the small script code that uses surely:

Script 1: Enter a homepage to broadcast voice automatically later

<embed Src= "pnm://10.13.31.90/~kayvin/mihunji.rm" Hidden=true Autostart=true Loop=true>

Script 2: After entering a homepage automatic most boast, of the province go be being clicked in oneself

It is quotative content below:
<script> Self.moveTo(0, 0) Self.resizeTo(screen.availWidth, screen.availHeight)
</script>

Script 3: The script between indication present tense

<script Language=vbscript>document.write Now</script>

Script 4: Show the script of last modification time

<script>document.write(document.lastModified)</script>

Script 5: Set for home page, add to collect, add channel, post a letter of the Outlook that start

It is quotative content below:

<a Style= "cursor:hAnd”Onclick= “this.style.behavior=” Url(#default#homepage) “; This.setHomePage(Http://10.13.31.90/~kayvin/) ; ">" > is set for home page </a>

<a Style= "cursor:hAnd ” Onclick= “window.external.AddFavorite(location.href, document.title);" > is joined collect </a>

<a Href=javascript:wIndow.external.addChannel("typhoon.cdf" )> joins channel </a>

<a Href= "Mailtkayvin@sohu.com "> contact </a> with me

Script 6: Between indication present tense of condition column trends

It is quotative content below:
<script> Function See(){ Window.setTimeout(”see()” , 1000); Today = New Date(); Self.status = Today.toString();
}
</script>
<body Onload=see()>

Script 7: Shut the script of the window

<a Href=javascript:cLose()>[closes the window] </a>

Script 8: Press F12 bolts, return home page directly

It is quotative content below:
<script>function Look(){ If(event.keyCode==123){document.location.href=http://10.13.31.90/~kayvin/}
} If(document.onkeydown==Null)
{document.onkeydown=look}
</script>

Script 9: Regressive, refresh, ongoing

It is quotative content below:

Regressive Onclick=history.go(-1)> of <input Type=button Value=

Onclick=history.go(-0)> of refresh of <input Type=button Value=

Ongoing Onclick=history.go( 1)> of <input Type=button Value=

Script 10: Set time plays a window, 4000=4 second, of course you can be defined oneself

It is quotative content below:

<script>function L()
{ Window.open(” 10.13.31.90/~kayvin/ ” , “Name” , “Width=500, height=150, border=0″ )
} SetTimeout(”l()” , 4000)

</script>

Script 11: The clew information on the side of the mouse, similar with the 163 page clew effects after loginning

It is quotative content below:

<a Href= "#" Title= " this is clew " >tip</a>
<script Language= "JavaScript" >
/ / *********** acquiesce installs a definition. ********************* Hint shows after TPopWait=50;// keeps second of TWait a person of extraordinary powers. TPopShow=5000;// shuts clew after second of indication TShow a person of extraordinary powers ShowPopStep=20; PopOpacity=99;
/ / *************** in-house variable defines ***************** SPop=null; CurShow=null; TFadeOut=null; TFadeIn=null; TFadeWaiting=null; Document.write("<style Type=’text/css’id=’defaultPopStyle’>" ); Document.write(”.cPopText { Background-color: #F8F8F5;color:#000000; Border: 1px #000000 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 12: If the character is too chief, turn too long part into suspension points to show

It is quotative content below:
<DIV STYLE= "width: 120px; Height: 50px; Border: 1px Solid Blue; Overflow: Hidden; Text-overflow:eLlipsis ">
<NOBR> has word of one style or manner of writing for instance namely, very long, the group inside form shows no less than. </NOBR>
</DIV>

Script 13: The picture of scroll

It is quotative content below:

<script Language= "javascript ">ImgArr=new Array()ImgArr[0]= "<a Href=# OnmouseMove=’javascript:oUtHover=true’ OnMouseover=’javascript:oUtHover=true’ OnMouseout=’javascript:oUtHover=false;mvStart()’><img Src=http://mc.mapabc.com/mapcard/images/LP_card_1.gif Border=0></a> "ImgArr[1]= "<a Href=# OnmouseMove=’javascript:oUtHover=true’ OnMouseover=’javascript:oUtHover=true’ OnMouseout=’javascript:oUtHover=false;mvStart()’><img Src=http://mc.mapabc.com/mapcard/images/LP_card_1.gif Border=0></a> "ImgArr[2]= "<a Href=# OnmouseMove=’javascript:oUtHover=true’ OnMouseover=’javascript:oUtHover=true’ OnMouseout=’javascript:oUtHover=false;mvStart()’><img Src=http://mc.mapabc.com/mapcard/images/LP_card_1.gif Border=0></a> "ImgArr[3]= "<a Href=# OnmouseMove=’javascript:oUtHover=true’ OnMouseover=’javascript:oUtHover=true’ OnMouseout=’javascript:oUtHover=false;mvStart()’><img Src=http://mc.mapabc.com/mapcard/images/LP_card_1.gif Border=0></a> "ImgArr[4]= "<a Href=# OnmouseMove=’javascript:oUtHover=true’ OnMouseover=’javascript:oUtHover=true’ OnMouseout=’javascript:oUtHover=false;mvStart()’><img Src=http://mc.mapabc.com/mapcard/images/LP_card_1.gif Border=0></a> "Var MoveStep=4 / / the condition is chief, unit: PixelVar MoveRelax=100 / / mobile time-interval, unit: MsNs4=(document.layers) ? True:fAlseVar DisplayImgAmount=4 / / vision area window can show a numberVar DivWidth=220 / / every picture is occupied wideVar DivHeight=145 / / every picture is occupied tallVar StartDnum=0Var NextDnum=startDnum displayImgAmountVar TimeIDVar OutHover=falseVar StartDivClipLeftVar NextDivClipRightFunction InitDivPlace(){If (ns4){For (i=0;i<displayImgAmount;i ){Eval(”document.divOuter.document.divAds” i “.left=” divWidth*i)
}For (i=displayImgAmount;i<imgArr.length;i ){Eval(”document.divOuter.document.divAds” i “.left=” divWidth*displayImgAmount)
}
}else{For (i=0;i<displayImgAmount;i ){Eval(”document.all.divAds” i “.style.left=” divWidth*i)
}For (i=displayImgAmount;i<imgArr.length;i ){Eval(”document.all.divAds” i “.style.left=” divWidth*displayImgAmount)
}
}
}Function MvStart(){TimeID=setTimeout(moveLeftDiv, moveRelax)
}Function MvStop(){ClearTimeout(timeID)
}Function MoveLeftDiv(){If (ns4){For (i=0;i<=displayImgAmount;i ){Eval(”document.divOuter.document.divAds” parseInt((startDnum i)%imgArr.length) “.left=document.divOuter.document.divAds” parseInt((startDnum i)%imgArr.length) “.left-moveStep” )
}StartDivClipLeft=parseInt(eval(”document.divOuter.document.divAds” startDnum “.clip.left” ) )NextDivClipRight=parseInt(eval(”document.divOuter.document.divAds” nextDnum “.clip.right” ) )If (startDivClipLeft moveStep>divWidth){Eval(”document.divOuter.document.divAds” nextDnum “.clip.right=” divWidth)
Eval(”document.divOuter.document.divAds” startDnum “.left=” divWidth*displayImgAmount)Eval(”document.divOuter.document.divAds” parseInt((nextDnum 1)%imgArr.length) “.left=document.divOuter.document.divAds” nextDnum “.left ” divWidth)Eval(”document.divOuter.document.divAds” parseInt((nextDnum 1)%imgArr.length) “.clip.left=0″ )

StartDnum=( startDnum)%imgArr.lengthNextDnum=(startDnum displayImgAmount)%imgArr.length
StartDivClipLeft=moveStep-(divWidth-startDivClipLeft)NextDivClipRight=moveStep-(divWidth-nextDivClipRight)
}else{Eval(”document.divOuter.document.divAds” nextDnum “.clip.left=0″ )StartDivClipLeft =moveStepNextDivClipRight =moveStep
}Eval(”document.divOuter.document.divAds” startDnum “.clip.left=” startDivClipLeft)Eval(”document.divOuter.document.divAds” nextDnum “.clip.right=” nextDivClipRight)
}else{For (i=0;i<=displayImgAmount;i ){Eval(”document.all.divAds” parseInt((startDnum i)%imgArr.length) “.style.left=document.all.divAds” parseInt((startDnum i)%imgArr.length) “.style.pixelLeft-moveStep” )
}
StartDivClipLeft=parseInt(eval(”document.all.divAds” startDnum “.currentStyle.clipLeft” ) )NextDivClipRight=parseInt(eval(”document.all.divAds” nextDnum “.currentStyle.clipRight” ) )
If (startDivClipLeft moveStep>divWidth){Eval(”document.all.divAds” nextDnum “.style.clip=’rect(0, ” DivWidth ” , ” DivHeight ” , 0″ “)’” )
Eval(”document.all.divAds” startDnum “.style.left=” divWidth*displayImgAmount)Eval(”document.all.divAds” parseInt((nextDnum 1)%imgArr.length) “.style.left=document.all.divAds” nextDnum “.style.pixelLeft ” divWidth)
StartDnum=( startDnum)%imgArr.lengthNextDnum=(startDnum displayImgAmount)%imgArr.length
StartDivClipLeft=moveStep-(divWidth-startDivClipLeft)NextDivClipRight=moveStep-(divWidth-nextDivClipRight)
}else{StartDivClipLeft =moveStepNextDivClipRight =moveStep
}Eval(”document.all.divAds” startDnum “.style.clip=’rect(0, ” DivWidth ” , ” DivHeight ” , ” StartDivClipLeft “)’” )Eval(”document.all.divAds” nextDnum “.style.clip=’rect(0, ” NextDivClipRight ” , ” DivHeight ” , 0)’” )
}If (outHover){MvStop()
}else{MvStart()
}

}Function WriteDivs(){If (ns4){Document.write("<ilayer Name=divOuter Width=750 Height=" divHeight ">" )
For (i=0;i<imgArr.length;i ){Document.write("<layer Name=divAds" i ">" )Document.write(imgArr[i] ” ” )Document.write("</layer>" )
}Document.write("</ilayer>" )Document.close()For (i=displayImgAmount;i<imgArr.length;i ){Eval(”document.divOuter.document.divAds” i “.clip.right=0″ )
}
}else{Document.write("<div Id=divOuter Style=’position:rElative’ Width=750 Height=" divHeight ">" )
For (i=0;i<imgArr.length;i ){Document.write("<div Id=divAds" i " Style=’position:aBsolute;clip:rEct(0, ” DivWidth ” , ” DivHeight ” , 0)’>" )Document.write(imgArr[i] ” ” )Document.write("</div>" )
}Document.write("</div>" )For (i=displayImgAmount;i<imgArr.length;i ){Eval(”document.all.divAds” i “.style.clip=’rect(0, 0, ” DivHeight ” , 0)’” )
}
}
}
</script>
<BODY Onload=javascript:mVStart()>
<SCRIPT Language=javascript>writeDivs();initDivPlace();</SCRIPT>

Script 14: Receive the script that clavier dictates

Can jump by A the webpage that turns to map calling card, press A please

It is quotative content below:

<SCRIPT Language= "JavaScript" >
< ! - -Var Hotkey=97Var Destination= “Http://mc.mapabc.com Http://mc.mapabc.comIf (document.layers)Document.captureEvents(Event.KEYPRESS)Function Backhome(e){If (document.layers){If (e.which==Hotkey)Window.location=destination
}Else If (document.all){If (event.keyCode==Hotkey)Window.location=destination
}
}Document.onkeypress=backhome

Onkeydown= “javascript:oNenter(); “

Function Onenter(){If(event.keyCode==13){” ); of Alert(” carriage return
}
}
</SCRIPT>

Script 15: The text version that allows you links fade-out fadein

It is quotative content below:

< ! DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<TITLE>New Document </TITLE>
<META NAME= "Generator" CONTENT= "EditPlus" >
<META NAME= "Author" CONTENT= "" >
<META NAME= "Keywords" CONTENT= "" >
<META NAME= "Description" CONTENT= "" >
</HEAD>

<BODY>
<script Language= "javascript" Type= "text/javascript ">

Definition of StartColor = “#671700″ ; // links colorEndColor = “#D8D1C5″ ; / / the definition wants gradual change to arrive final color

StepIn = 17;StepOut = 23;

/ *
Whether does the definition let all text link automatic gradual change, true is is, false is deny
*/AutoFade = True;

/ *
Define kind of Class in Css style here: Fade, if be True, so you want this Fade type will be added on the link of gradual change
*/SloppyClass = False;

Hexa = New Makearray(16);For(var I = 0; I<10; I )Hexa[i] = I;Hexa[10]= “a” ; Hexa[11]= “b” ; Hexa[12]= “c” ;Hexa[13]= “d” ; Hexa[14]= “e” ; Hexa[15]= “f” ;

Document.onmouseover = Domouseover;Document.onmouseout = Domouseout;

StartColor = Dehexize(startColor.toLowerCase());EndColor = Dehexize(endColor.toLowerCase());

Var FadeId = New Array();

Function Dehexize(Color){Var ColorArr = New Makearray(3);For (i=1; I<7; I ){For (j=0; J<16; J ){If (Color.charAt(i)==Hexa[j]){If (i%2! =0)ColorArr[Math.floor((i-1)/2)]=eval(j)*16;ElseColorArr[Math.floor((i-1)/2)] =eval(j);
}
}
}Return ColorArr;
}

Function Domouseover() {If(document.all){Var SrcElement = Event.srcElement;If ((srcElement.tagName=="A" &&AutoFade) | | SrcElement.className==”Fade” | | (SloppyClass &&SrcElement.className.indexOf(”fade” ) ! = -1) )Fade(startColor, endColor, srcElement.uniqueID, stepIn);
}
}

Function Domouseout() {If (document.all){Var SrcElement = Event.srcElement;If ((srcElement.tagName=="A" &&AutoFade) | | SrcElement.className==”Fade” | | (SloppyClass &&SrcElement.className.indexOf(”fade” ) ! = -1) )Fade(endColor, startColor, srcElement.uniqueID, stepOut);
}
}

Function Makearray(n) {This.length = N;For(var I = 1; I <= N; I )This[i] = 0;Return This;
}

Function Hex(i) {If (i<0)Return “00″ ;Else If (i>255)Return “ff” ;ElseReturn “” Hexa[Math.floor(i/16)] Hexa[i];}

Function SetColor(r, g, b, element) {Var Hr = Hex(r); Var Hg = Hex(g); Var Hb = Hex(b);Element.style.color = “#” hr hg hb;
}

Function Fade(s, e, element, step){Var Sr = S[0]; Var Sg = S[1]; Var Sb = S[2];Var Er = E[0]; Var Eg = E[1]; Var Eb = E[2];
If (fadeId[0] ! = Null &&Fade[0] ! = Element){SetColor(sr, sg, sb, eval(fadeId[0]));Var I = 1;While(i<FadeId.length){ClearTimeout(fadeId[i]);I ;
}
}
For(var I = 0; I <= Step; I ) {FadeId[i 1] = SetTimeout(”setColor(Math.floor(” sr ” *((” step ” - ” i ” )/ ” step ” ) ” er ” * (” i “/” Step “)) , math.floor(” sg ” * ((” step ” - ” i ” )/ ” step ” ) ” eg ” * (” i “/” step
“) ) , math.floor(” sb ” * ((” step “-” i “)/” step “) ” eb ” * (” i “/” step “)) , ” Element “);” , i*step);
}FadeId[0] = Element;
}

</script>

</BODY>
</HTML>
<A HREF= "" > lets your text link fade-out fadein </A>

Script 16: Similar the good friend with QQ / highest grade of _ of the tree of blacklist and so on menu

It is quotative content below:

< ! DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<TITLE>New Document </TITLE>
<META NAME= "Generator" CONTENT= "EditPlus" >
<META NAME= "Author" CONTENT= "" >
<META NAME= "Keywords" CONTENT= "" >
<META NAME= "Description" CONTENT= "" >
</HEAD>

<BODY>
<script>If (! Document.getElementById)Document.getElementById = Function() {Return Null; }

Function InitializeMenu(menuId, actuatorId) {Var Menu = Document.getElementById(menuId);Var Actuator = Document.getElementById(actuatorId);

If (menu==Null | | Actuator==Null) Return;

/ / If (window.opera) Return; // I’m Too Tired

Actuator.parentNode.style.backgroundImage = “url(/images/plus.gif)” ;Actuator.onclick = Function() {Var Display = Menu.style.display;This.parentNode.style.backgroundImage =
(Display==”Block” ) ? “Url(/images/plus.gif)” : “Url(/images/minus.gif)” ;Menu.style.display = (display==”Block” ) ? “None” : “Block” ;

Return False;
}
}Window.onload = Function() {InitializeMenu(”productsMenu” , “ProductsActuator” );InitializeMenu(”newPhonesMenu” , “NewPhonesActuator” );InitializeMenu(”compareMenu” , “CompareActuator” );
}
</script>
<style>Body {Font-family: Verdana, helvetica, arial, sans-serif;
}

#mainMenu {Background-color: #EEE;Border: 1px Solid #CCC;Color: #000;Width: 203px;
}

#menuList {Margin: 0px;Padding: 10px 0px 10px 15px;
}

Li.menubar {Background: Url(/images/plus.gif) No-repeat 0em 0.3em;Font-size: 12px;Line-height: 1.5em;List-style: None Outside;
}

.menu, .submenu {Display: None;Margin-left: 15px;Padding: 0px;
}

.menu Li, .submenu Li {Background: Url(/images/square.gif) No-repeat 0em 0.3em;List-style: None Outside;
}

A.actuator {Background-color: Transparent;Color: #000;Font-size: 12px;Padding-left: 15px;Text-decoration: None;
}

A.actuator:hOver {Text-decoration: Underline;
}

.menu Li A, .submenu Li A {Background-color: Transparent;Color: #000;Font-size: 12px;Padding-left: 15px;Text-decoration: None;
}

.menu Li A:hOver, submenu Li A:hOver {
/ *border-bottom: 1px Dashed #000;*/Text-decoration: Underline;
}

Span.key {Text-decoration: Underline;
}
</style>
</head>
<body>
<div Id= "mainMenu" >
<ul Id= "menuList" >
<li Class= "menubar" >
</a> of favorite of beautiful region of graph of <a Href= "#" Id= "productsActuator" Class= "actuator" >
<ul Id= "productsMenu" Class= "menu" >
<li>
<a Href= "#" Id= "newPhonesActuator" Class= "actuator" > my good friend </a>
<ul Id= "newPhonesMenu" Class= "submenu ">
<li><a Href= "Http://mc.mapabc.com/mapcard/card.jsp? Pp=1000000001 "> Zhang San [10000001]</a></li>
<li><a Href= "Http://mc.mapabc.com/mapcard/card.jsp? Pp=1000000001 "> Li Si [10000002]</a></li>
<li><a Href= "Http://mc.mapabc.com/mapcard/card.jsp? Pp=1000000001 "> Zhang San [10000001]</a></li>
<li><a Href= "Http://mc.mapabc.com/mapcard/card.jsp? Pp=1000000001 "> Li Si [10000002]</a></li>
</ul>
</li>
<li>
</a> of stranger of <a Href= "#" Id= "compareActuator" Class= "actuator" >
<ul Id= "compareMenu" Class= "submenu" >
<li><a Href= "Http://mc.mapabc.com/mapcard/card.jsp? Pp=1000000001 "> Zhang San [10000001]</a></li>
<li><a Href= "Http://mc.mapabc.com/mapcard/card.jsp? Pp=1000000001 "> Li Si [10000002]</a></li>
<li><a Href= "Http://mc.mapabc.com/mapcard/card.jsp? Pp=1000000001 "> Zhang San [10000001]</a></li>
<li><a Href= "Http://mc.mapabc.com/mapcard/card.jsp? Pp=1000000001 "> Li Si [10000002]</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</body>
</BODY>
</HTML>

Script 17: Script translates page code

It is quotative content below:

< ! Doctype Html Public “-//W3C//DTD XHTML 1.0 Transitional//EN” “Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
<html Xmlns= "Http://www.w3.org/1999/xhtml ">
<head>
<meta Http-equiv= "Content-Type" Content= "text/html; Charset=gb2312" />
<title>JavaScript: ShowPages V1.0 [by Lapuasi.com]</title>
<script Language= "JavaScript" >
< ! - -
/ *

ShowPages V1.1
=================================

Infomation
———————-
Author: Lapuasi
E-Mail: Lapuasi@gmail.com
Web: Http://www.lapuasi.com
Date: 2005-11-17

Example
———————-Var Pg = New ShowPages(’pg’);Pg.pageCount = 12; // defines total page to count (necessary)Pg.argName = ‘p’; / / definition parameter name (optional, default is Page)Pg.printHtml(); / / indication page number

Supported In Internet Explorer, mozilla Firefox
*/

Attribute of initialization of Function ShowPages(name) {//This.name = Name; / / object nameThis.page = 1; / / current page numberThis.pageCount = 1; / / total page numberName of parameter of This.argName = ‘page’; //This.showTimes = 1; / / the frequency that print
}

Url of clump of ShowPages.prototype.getPage = Function(){// obtains current page to count, if variable repeats,get only the lastVar Args = Location.search;Var Reg = New RegExp(’[\ ? &] ? ‘ This.argName ‘=([^&]*)[&$] ? ‘ , ‘gi’);Var Chk = Args.match(reg);This.page = RegExp. $1;
}The page before ShowPages.prototype.checkPages = Function(){// undertakes becoming counts the test and verify that counts with total pageIf (isNaN(parseInt(this.page))) This.page = 1;If (isNaN(parseInt(this.pageCount))) This.pageCount = 1;If (this.page<1) This.page = 1;If (this.pageCount<1) This.pageCount = 1;If (this.page>This.pageCount) This.page = This.pageCount;This.page = ParseInt(this.page);This.pageCount = ParseInt(this.pageCount);
}ShowPages.prototype.createHtml = Function(mode){// generates Html codeVar StrHtml = ” , prevPage = This.page - 1, nextPage = This.page 1;If (mode==” | | Typeof(mode)==’undefined’) Mode = 0;Switch (mode) {Case 0: / / number of page of mode 1 (, home page, before page, hind page, end page)StrHtml = ‘<span Class= "count" >Pages: ‘ This.page ‘ / ‘ This.pageCount ‘</span>’;StrHtml = ‘<span Class= "number" >’;If (prevPage<1) {StrHtml = ‘<span Title= "First Page" >«</span>’;StrHtml = ‘<span Title= "Prev Page" >‹</span>’;
} Else {StrHtml = ‘<span Title= "First Page" ><a Href= "javascript:’ This.name ‘.toPage(1);" >«</a></span>’;StrHtml = ‘<span Title= "Prev Page" ><a Href= "javascript:’ This.name ‘.toPage(’ PrevPage ‘);" >‹</a></span>’;
}For (var I = 1; I <= This.pageCount; I ) {If (i>0) {If (i==This.page) {StrHtml = ‘<span Title= "Page ‘ I ‘" >[’ I ‘]</span>’;
} Else {StrHtml = ‘<span Title= "Page ‘ I ‘" ><a Href= "javascript:’ This.name ‘.toPage(’ I ‘);" >[’ I ‘]</a></span>’;
}
}
}If (nextPage>This.pageCount) {StrHtml = ‘<span Title= "Next Page" >›</span>’;StrHtml = ‘<span Title= "Last Page" >»</span>’;
} Else {StrHtml = ‘<span Title= "Next Page" ><a Href= "javascript:’ This.name ‘.toPage(’ NextPage ‘);" >›</a></span>’;StrHtml = ‘<span Title= "Last Page" ><a Href= "javascript:’ This.name ‘.toPage(’ This.pageCount ‘);" >»</a></span>’;
}StrHtml = ‘</span><br />’;Break;Case 1: / / skeletonize of page of mode 1 (10, home page, before page, hind page, end page)StrHtml = ‘<span Class= "count" >Pages: ‘ This.page ‘ / ‘ This.pageCount ‘</span>’;StrHtml = ‘<span Class= "number" >’;If (prevPage<1) {StrHtml = ‘<span Title= "First Page" >«</span>’;StrHtml = ‘<span Title= "Prev Page" >‹</span>’;
} Else {StrHtml = ‘<span Title= "First Page" ><a Href= "javascript:’ This.name ‘.toPage(1);" >«</a></span>’;StrHtml = ‘<span Title= "Prev Page" ><a Href= "javascript:’ This.name ‘.toPage(’ PrevPage ‘);" >‹</a></span>’;
}If (this.page % 10==0) {Var StartPage = This.page - 9;
} Else {Var StartPage = This.page - This.page % 10 1;
}If (startPage>10) StrHtml = ‘<span Title= "Prev 10 Pages" ><a Href= "javascript:’ This.name ‘.toPage(’ (startPage - 1) ‘);" > . . . </a></span>’;For (var I = StartPage; I<StartPage 10; I ) {If (i>This.pageCount) Break;If (i==This.page) {StrHtml = ‘<span Title= "Page ‘ I ‘" >[’ I ‘]</span>’;
} Else {StrHtml = ‘<span Title= "Page ‘ I ‘" ><a Href= "javascript:’ This.name ‘.toPage(’ I ‘);" >[’ I ‘]</a></span>’;
}
}If (this.pageCount >= StartPage 10) StrHtml = ‘<span Title= "Next 10 Pages" ><a Href= "javascript:’ This.name ‘.toPage(’ (startPage 10) ‘);" > . . . </a></span>’;If (nextPage>This.pageCount) {StrHtml = ‘<span Title= "Next Page" >›</span>’;StrHtml = ‘<span Title= "Last Page" >»</span>’;
} Else {StrHtml = ‘<span Title= "Next Page" ><a Href= "javascript:’ This.name ‘.toPage(’ NextPage ‘);" >›</a></span>’;StrHtml = ‘<span Title= "Last Page" ><a Href= "javascript:’ This.name ‘.toPage(’ This.pageCount ‘);" >»</a></span>’;
}StrHtml = ‘</span><br />’;Break;Case 2: / / skeletonize of around of mode 2 (, page number, home page, before page, hind page, end page)StrHtml = ‘<span Class= "count" >Pages: ‘ This.page ‘ / ‘ This.pageCount ‘</span>’;StrHtml = ‘<span Class= "number" >’;If (prevPage<1) {StrHtml = ‘<span Title= "First Page" >«</span>’;StrHtml = ‘<span Title= "Prev Page" >‹</span>’;
} Else {StrHtml = ‘<span Title= "First Page" ><a Href= "javascript:’ This.name ‘.toPage(1);" >«</a></span>’;StrHtml = ‘<span Title= "Prev Page" ><a Href= "javascript:’ This.name ‘.toPage(’ PrevPage ‘);" >‹</a></span>’;
}If (this.page! = 1) StrHtml = ‘<span Title= "Page 1" ><a Href= "javascript:’ This.name ‘.toPage(1);" >[1]</a></span>’;If (this.page >= 5) StrHtml = ‘<span> . . . </span>’;If (this.pageCount>This.page 2) {Var EndPage = This.page 2;
} Else {Var EndPage = This.pageCount;
}For (var I = This.page - 2; I <= EndPage; I ) {If (i>0) {If (i==This.page) {StrHtml = ‘<span Title= "Page ‘ I ‘" >[’ I ‘]</span>’;
} Else {If (i! = 1 &&I! = This.pageCount) {StrHtml = ‘<span Title= "Page ‘ I ‘" ><a Href= "javascript:’ This.name ‘.toPage(’ I ‘);" >[’ I ‘]</a></span>’;
}
}
}
}If (this.page 3<This.pageCount) StrHtml = ‘<span> . . . </span>’;If (this.page! = This.pageCount) StrHtml = ‘<span Title= "Page ‘ This.pageCount ‘" ><a Href= "javascript:’ This.name ‘.toPage(’ This.pageCount ‘);" >[’ This.pageCount ‘]</a></span>’;If (nextPage>This.pageCount) {StrHtml = ‘<span Title= "Next Page" >›</span>’;StrHtml = ‘<span Title= "Last Page" >»</span>’;
} Else {StrHtml = ‘<span Title= "Next Page" ><a Href= "javascript:’ This.name ‘.toPage(’ NextPage ‘);" >›</a></span>’;StrHtml = ‘<span Title= "Last Page" ><a Href= "javascript:’ This.name ‘.toPage(’ This.pageCount ‘);" >»</a></span>’;
}StrHtml = ‘</span><br />’;Break;Case 3: / / style of arrowhead of mode 3 (, home page, before page, hind page, end page) (Only IE)StrHtml = ‘<span Class= "count" >Pages: ‘ This.page ‘ / ‘ This.pageCount ‘</span>’;StrHtml = ‘<span Class= "arrow" >’;If (prevPage<1) {StrHtml = ‘<span Title= "First Page" >9</span>’;StrHtml = ‘<span Title= "Prev Page" >7</span>’;
} Else {StrHtml = ‘<span Title= "First Page" ><a Href= "javascript:’ This.name ‘.toPage(1);" >9</a></span>’;StrHtml = ‘<span Title= "Prev Page" ><a Href= "javascript:’ This.name ‘.toPage(’ PrevPage ‘);" >7</a></span>’;
}If (nextPage>This.pageCount) {StrHtml = ‘<span Title= "Next Page" >8</span>’;StrHtml = ‘<span Title= "Last Page" >:&Lt;/span>’;
} Else {StrHtml = ‘<span Title= "Next Page" ><a Href= "javascript:’ This.name ‘.toPage(’ NextPage ‘);" >8</a></span>’;StrHtml = ‘<span Title= "Last Page" ><a Href= "javascript:’ This.name ‘.toPage(’ This.pageCount ‘);" >:&Lt;/a></span>’;
}StrHtml = ‘</span><br />’;Break;Case 4: / / circle is drawn below mode 4 ()If (this.pageCount<1) {StrHtml = ‘<select Name= "toPage" Disabled>’;StrHtml = ‘<option Value= "0" >No Pages</option>’;
} Else {Var ChkSelect;StrHtml = ‘<select Name= "toPage" Onchange= "’ This.name ‘.toPage(this);" >’;For (var I = 1; I <= This.pageCount; I ) {If (this.page==I) ChkSelect=’ Selected= “selected” ‘;Else ChkSelect=”;StrHtml = ‘<option Value= "’ I ‘" ‘ ChkSelect ‘>Pages: ‘ I ‘ / ‘ This.pageCount ‘</option>’;
}
}StrHtml = ‘</select>’;Break;Case 5: / / mode 5 (inputs casing)StrHtml = ‘<span Class= "input" >’;If (this.pageCount<1) {StrHtml = ‘<input Type= "text" Name= "toPage" Value= "No Pages" Class= "itext" Disabled= "disabled" >’;StrHtml = ‘<input Type= "button" Name= "go" Value= "GO" Class= "ibutton" Disabled= "disabled" ></option>’;
} Else {StrHtml = ‘<input Type= "text" Value= "Input Page:" Class= "ititle" Readonly= "readonly" >’;StrHtml = ‘<input Type= "text" Id= "pageInput’ This.showTimes ‘" Value= "’ This.page ‘" Class= "itext" Title= "Input Page" Onkeypress= "return ‘ This.name ‘.formatInputPage(event);" Onfocus= "this.select()" >’;StrHtml = ‘<input Type= "text" Value= " / ‘ This.pageCount ‘" Class= "icount" Readonly= "readonly" >’;StrHtml = ‘<input Type= "button" Name= "go" Value= "GO" Class= "ibutton" Onclick= "’ This.name ‘.toPage(document.getElementById(\’pageInput’ This.showTimes ‘\’).value);" ></option>’;
}StrHtml = ‘</span>’;Break;Default: StrHtml = ‘Javascript ShowPage Error: Not Find Mode ‘ Mode;Break;
}Return StrHtml;
}ShowPages.prototype.createUrl = Function (page) {// generates a page to jump turn UrlIf (isNaN(parseInt(page))) Page = 1;If (page<1) Page = 1;If (page>This.pageCount) Page = This.pageCount;Var Url = Location.protocol ‘//’ Location.host Location.pathname;Var Args = Location.search;Var Reg = New RegExp(’([\ ? &] ? ) ‘ This.argName ‘=[^&]*[&$] ? ‘ , ‘gi’);Args = Args.replace(reg, ‘$1′);If (args==” | | Args==Null) {Args = ‘ ? ‘ This.argName ‘=’ Page;
} Else If (args.substr(args.length - 1, 1)==’ ? ‘ | | Args.substr(args.length - 1, 1)==’&’) {Args = This.argName ‘=’ Page;
} Else {Args = ‘&’ This.argName ‘=’ Page;
}Return Url Args;
}Page of ShowPages.prototype.toPage = Function(page){// jumps turnVar TurnTo = 1;If (typeof(page)==’object’) {TurnTo = Page.options[page.selectedIndex].value;
} Else {TurnTo = Page;
}Self.location.href = This.createUrl(turnTo);
}ShowPages.prototype.printHtml = Function(mode){// displays Html codeThis.getPage();This.checkPages();This.showTimes = 1;Document.write(’<div Id= "pages_’ This.name ‘_’ This.showTimes ‘" Class= "pages" ></div>’);Document.getElementById(’pages_’ This.name ‘_’ This.showTimes).innerHTML = This.createHtml(mode);

}Demarcate of ShowPages.prototype.formatInputPage = Function(e){// inputs a page to count a formatVar Ie = Navigator.appName==”Microsoft Internet Explorer” ? True:fAlse;If(! Ie) Var Key = E.which;Else Var Key = Event.keyCode;If (key==8 | | Key==46 | | (Key >= 48 &&Key <= 57)) Return True;Return False;
}
/ /- - >
</script>
<style>
/ * Pages Main Tyle */
.pages {Color: #000000;Cursor: Default;Font-size: 10px;Font-family: Tahoma, verdana;Padding: 3px 0px 3px 0px;
}
.pages.count, .pages.number, .pages.arrow {Color: #000000;Font-size: 10px;Background-color: #F7F7F7;Border: 1px Solid #CCCCCC;
}
/ * Page And PageCount Style */
.pages.count {Font-weight: Bold;Border-right: None;Padding: 2px 10px 1px 10px;
}
/ * Mode 0, 1, 2 Style (Number) */
.pages.number {Font-weight: Normal;Padding: 2px 10px 1px 10px;
}
.pages.number A, .pages.number Span {Font-size: 10px;
}
.pages.number Span {Color: #999999;Margin: 0px 3px 0px 3px;
}
.pages.number A {Color: #000000;Text-decoration: None;
}
.pages.number A:hOver {Color: #0000ff;
}
/ * Mode 3 Style (Arrow) */
.pages.arrow {Font-weight: Normal;Padding: 0px 5px 0px 5px;
}
.pages.arrow A, .pages.arrow Span {Font-size: 10px;Font-family: Webdings;
}
.pages.arrow Span {Color: #999999;Margin: 0px 5px 0px 5px;
}
.pages.arrow A {Color: #000000;Text-decoration: None;
}
.pages.arrow A:hOver {Color: #0000ff;
}
/ * Mode 4 Style (Select) */
.pages Select, .pages Input {Color: #000000;Font-size: 10px;Font-family: Tahoma, verdana;
}
/ * Mode 5 Style (Input) */
.pages.input Input.ititle, .pages.input Input.itext, .pages.input Input.icount {Color: #666666;Font-weight: Bold;Background-color: #F7F7F7;Border: 1px Solid #CCCCCC;
}
.pages.input Input.ititle {Width: 70px;Text-align: Right;Border-right: None;
}
.pages.input Input.itext {Width: 25px;Color: #000000;Text-align: Right;Border-left: None;Border-right: None;
}
.pages.input Input.icount {Width: 35px;Text-align: Left;Border-left: None;
}
.pages.input Input.ibutton {Height: 17px;Color: #FFFFFF;Font-weight: Bold;Font-family: Verdana;Background-color: #999999;Border: 1px Solid #666666;Padding: 0px 0px 2px 1px;Margin-left: 2px;Cursor: Hand;
}

/ * Body */Body {Font-size: 12px;
}
</style>
</head>

<body>
<script Language= "JavaScript" >
< ! - -Var Pg = New ShowPages(’pg’);Pg.pageCount =12; / / definition total page is counted (necessary)
/ / Pg.argName = ‘p’; / / definition parameter name (optional, acquiesce is Page)

Document.write(’<br>Show Times: ‘ Pg.showTimes ‘ , mood Default’);Pg.printHtml();Document.write(’<br>Show Times: ‘ Pg.showTimes ‘ , mood 0′);Pg.printHtml(0);Document.write(’<br>Show Times: ‘ Pg.showTimes ‘ , mood 1′);Pg.printHtml(1);Document.write(’<br>Show Times: ‘ Pg.showTimes ‘ , mood 2′);Pg.printHtml(2);Document.write(’<br>Show Times: ‘ Pg.showTimes ‘ , mood 3 (only IE)’);Pg.printHtml(3);Document.write(’<br>Show Times: ‘ Pg.showTimes ‘ , mood 4′);Pg.printHtml(4);Document.write(’<br>Show Times: ‘ Pg.showTimes ‘ , mood 5′);Pg.printHtml(5);
/ /- - >
</script>
</body>
</html>

Script 18: The hyaline layer of DIV comes true

It is quotative content below:

<body Bgcolor= "#ff0ddd" >
<div Id= "Layer1" Style= "position:aBsolute; Width:260px; Height:115px; Z-index:1; Left: 50px; Top: 77px; Filter:ALpha(opacity=30) “>
<table Width= "96%" Border= "1" Cellpadding= "1" Cellspacing= "1" Bordercolor= "#FFFFFF" Bgcolor= "#999999" >
<tr>

You also can insert <td Height= "25" Bgcolor= "#f5f5f5" Class= "13" > here picture </td>
</tr>
<tr>

You think <td Height= "20" Bgcolor= "#f5f5f5" Class= "12" > register map calling card </td>
</tr>
<tr>

<td Height= "20" Bgcolor= "#f5f5f5" Class= "12" >http://mc.mapabc.com</td>
</tr>
<tr>

<td Height= "20" Bgcolor= "#f5f5f5" Class= "12" >EMAIL:lIpeng@mapabc.com</td>
</tr>
<tr>

</td> of address of <td Height= "20" Bgcolor= "#f5f5f5" Class= "12" >
</tr>
<tr>

</td> of postcode of <td Height= "20" Bgcolor= "#f5f5f5" Class= "12" >
</tr>
</table>
</div>

Bookmark:Digg Del.icio.us Reddit

Leave a Comment