Add to favorites, scroll subtitles, marquee Information bar, image scrolling, prohibited source code, time, wavy text... code

Source: Internet
Author: User

Add to favorites
Add the following content between <body> and </body>:

<Script language = JavaScript>
Function bookmarkit (){
Window. External. AddFavorite ('HTTP: // material.myrice.com ', 'yidi Network'
)}
If (document. all) document. write ('<a href = "#" onclick = "bookmarkit ()"> <strong> Add your site to favorites </strong> </a> ')
</SCRIPT>
 

Set as Homepage
 
Add the following content between <body> and </body>:

<Span onclick = "Var strhref ="/window. Location. href ";
This. style. Behavior = 'url (# default # homepage )';
This. setHomePage ('HTTP: // 5dcity.yeah.net ');"
Style = "cursor: Hand">
Set the current city as the home page </span>
 
 
 

Scroll subtitles
Add the following content between <body> and </body>:

<Table border = "0" cellspacing = "5" cellpadding = "0" vspace = "0" hspace = "0" bordercolor = "# b7b4b5">
<Tr> <TD colspan = "2">
<! -Direction = up/down/left/right/...>
<! -Height = subtitle height width = subtitle width>
<Marquee direction = up Height = 150 width = 100
Onmouseout = This. scrolldelay = 1
Onmouseover = This. scrolldelay = 600
Scrollamount = 1 scrolldelay = 1 class = "TT">
Scroll subtitle effect <br>
Scroll subtitle effect <br>
Scroll subtitle effect <br>
Scroll subtitle effect <br>
Scroll subtitle effect <br>
Scroll subtitle effect <br>
Scroll subtitle effect <br>
Scroll subtitle effect </marquee>
</TD> </tr> </table>
 

Information bar
Add the following between

<Script language = "JavaScript">
Function makearray (size)
{
This. Length = size;
For (I = 1; I <= size; I ++)
{
This [I] = 0
}
Return this;
}
MSG = new makearray (3)
MSG [2] = "Hi! Hello. Have you seen it? "
MSG [1] = "you can display different content as needed! ";
MSG [3] = "the latest information is displayed in this window! "
Interval = 100;
SEQ = 0;
I = 1;
Function scroll (){
Document. tmform. tmtext. value = MSG [I]. substring (0, seq + 1 );
SEQ ++;
If (SEQ> = MSG [I]. Length) {seq = 0; I +++; interval = 900 };
If (I> 3) {I = 1 };
Window. setTimeout ("scroll ();", interval); integer = 100
};
</SCRIPT>

Add the following content between <body> and </body>:

<Form name = "tmform">
<P align = "center">
<Input type = "text" name = "tmtext" size = "40">
</P> </form>

Change <body> to <body onload = "scroll ()">
 
 
 
Image rolling announcement
 
Add the following content between <body> and </body>:

<Script language = javascript1.2>
/* Set the following parameters. Set the scrollerwidth and scrollerheight parameters to the largest size in the scrolling image. */
VaR scrolling erwidth = 157
VaR scrolling erheight = 157
VaR scrollerbgcolor = 'white'
// Pause each graph for 3 seconds.
VaR pausebetweenimages = 3000
// The line below the boundary. If you want the logo to be connected, add the <A> label.
VaR slideimages = new array ()
Slideimages [0] = '<a href = "../images/020.jpg" target =" _ blank ">
</a>'
Slideimages [1] = '<a href = "../images/023.jpg" target =" _ blank ">
</a>'
Slideimages [2] = '<a href = "../images/006.jpg" target =" _ blank ">
</a>'
Slideimages [3] = '<a href = "../images/008.jpg" target =" _ blank ">
</a>'
// Add more.
/// // Do not modify the following ////////////////
If (slideimages. length> 1)
I = 2
Else
I = 0
Function move1 (whichlayer ){
Tlayer = eval (whichlayer)
If (tlayer. Top> 0 & tlayer. Top <= 5 ){
Tlayer. Top = 0
SetTimeout ("move1 (tlayer)", pausebetweenimages)
SetTimeout ("move2(document.main.doc ument. Second)", pausebetweenimages)
Return
}
If (tlayer. Top> fig. Doc ument. Height *-1 ){
Tlayer. Top-= 5
SetTimeout ("move1 (tlayer)", 100)
}
Else {
Tlayer. Top = scrollerheight
Tlayer.doc ument. Write (slideimages [I])
Tlayer.doc ument. Close ()
If (I = slideimages. Length-1)
I = 0
Else
I ++
}}
Function move2 (whichlayer ){
Tlayer2 = eval (whichlayer)
If (tlayer2.top> 0 & tlayer2.top <= 5 ){
Tlayer2.top = 0
SetTimeout ("move2 (tlayer2)", pausebetweenimages)
SetTimeout ("move1(document.main.doc ument. First)", pausebetweenimages)
Return
}
If (tlayer2.top> extends tlayer2.doc ument. Height *-1 ){
Tlayer2.top-= 5
SetTimeout ("move2 (tlayer2)", 100)
}
Else {
Tlayer2.top = scrollerheight
Tlayer2.document. Write (slideimages [I])
Tlayer2.document. Close ()
If (I = slideimages. Length-1)
I = 0
Else
I ++
}}
Function move3 (whichdiv ){
Tdiv = eval (whichdiv)
If (tdiv. style. pixeltop> 0 & tdiv. style. pixeltop <= 5 ){
Tdiv. style. pixeltop = 0
SetTimeout ("move3 (tdiv)", pausebetweenimages)
SetTimeout ("move4 (second2)", pausebetweenimages)
Return
}
If (tdiv. style. pixeltop> = tdiv. offsetheight *-1 ){
Tdiv. style. pixeltop-= 5
SetTimeout ("move3 (tdiv)", 100)
}
Else {
Tdiv. style. pixeltop = scrollerheight
Tdiv. innerhtml = slideimages [I]
If (I = slideimages. Length-1)
I = 0
Else
I ++
}
}
Function move4 (whichdiv ){
Tdiv2 = eval (whichdiv)
If (tdiv2.style. pixeltop> 0 & tdiv2.style. pixeltop <= 5 ){
Tdiv2.style. pixeltop = 0
SetTimeout ("move4 (tdiv2)", pausebetweenimages)
SetTimeout ("move3 (first2)", pausebetweenimages)
Return
}
If (tdiv2.style. pixeltop> = tdiv2.offsetheight *-1 ){
Tdiv2.style. pixeltop-= 5
SetTimeout ("move4 (second2)", 100)
}
Else {
Tdiv2.style. pixeltop = scrollerheight
Tdiv2.innerhtml = slideimages [I]
If (I = slideimages. Length-1)
I = 0
Else
I ++
}}
Function startscroll (){
If (document. All ){
Move3 (first2)
Second2.style. Top = scrollerheight
}
Else if (document. layers ){
Move1(document.main.doc ument. First)
Document.main.doc ument. Second. Top = scrollerheight + 5
Document.main.doc ument. Second. Visibility = 'show'
}}
Window. onload = startscroll
</SCRIPT>
<Script language = javascript1.2>
If (document. All ){
Document. writeln ('<span id = "main2" style = "position: relative; width:' + scrollerwidth + '; Height:' + scrollerheight + '; overflow: hiden; background-color: '+ scrollerbgcolor +' "> ')
Document. writeln ('<Div style = "position: absolute; width:' + scrollerwidth + '; Height:' + scrollerheight + '; clip: rect (0' + scrollerwidth + ''+ scrollerheight + '0); left: 0; top: 0"> ')
Document. writeln ('<Div id = "first2" style = "position: absolute; width:' + scrollerwidth + '; left: 0; top: 1;"> ')
Document. Write (slideimages [0])
Document. writeln ('</div> ')
Document. writeln ('<Div id = "second2" style = "position: absolute; width:' + scrollerwidth + '; left: 0; top: 0"> ')
Document. Write (slideimages [1])
Document. writeln ('</div> ')
Document. writeln ('</div> ')
Document. writeln ('</span> ')
}
</SCRIPT>
 
 
 
Do not view source code
 
Add the following content between <body> and </body>:

<Script language = JavaScript>
Function click ()
{If (event. Button = 2)
{Alert ('Welcome to yidi Network ');}}
Document. onmousedown = click
</SCRIPT>
 
 
 
Current Time
Add the following content between <body> and </body>:

<Script language = "JavaScript">
<! -- Begin
Stamp = new date ();
Document. write ('<font size = "2" face = "Arial"> <B>' + (stamp. getmonth () + 1) + "/" + stamp. getdate () + "/" + stamp. getyear () + '</B> </font> <br> ');
VaR hours;
VaR mins;
VaR time;
Hours = stamp. gethours ();
If (hours> = 12 ){
Time = "P. M .";
}
Else {
Time = "A. M .";
}
If (hours> 12 ){
Hours-= 12;
}
If (hours = 0 ){
Hours = 12;
}
Mins = stamp. getminutes ();
If (mins <10 ){
Mins = "0" + mins;
}
Document. write ('<font size = "2" face = "Arial"> <B>' + hours + ": "+ mins + time + '</B> </font> ');
// End
// --> </SCRIPT>
 
 
 
Greetings at different times
 
Add the following content between <body> and </body>:

<Table width = "100%" border = "0" cellspacing = "0" cellpadding = "0">
<Tr> <TD>
<Div align = "center"> <br>

<Script language = "JavaScript">
Now = new date (), hour = now. gethours ()
If (hour <6) {document. Write ("good morning! ")}
Else if (hour <9) {document. Write ("good morning! ")}
Else if (hour <12) {document. Write ("good morning! ")}
Else if (hour <14) {document. Write ("Good noon! ")}
Else if (hour <17) {document. Write ("Good afternoon! ")}
Else if (hour <19) {document. Write ("Good evening! ")}
Else if (hour <22) {document. Write ("Good evening! ")}
Else {document. Write ("Good night! ")}
</SCRIPT>

</Div>
</TD> </tr>
</Table>
 
 
 
Float text
Add the following between

<SCRIPT>
Message = "Welcome to 5d city J *** a download"
Ns6switch = 1

VaR ns6 = Document. getelementbyid &&! Document. All
MEs = new array ();
MES [0] =-1;
MES [1] =-4;
MES [2] =-7; MES [3] =-10;
MES [4] =-7;
MES [5] =-4;
MES [6] =-1;
Num = 0;
Num2 = 0;
TXT = "";
Function jump0 (){
If (ns6 &&! Ns6switch ){
Jump. innerhtml = message
Return
}
If (message. length> 6 ){
For (I = 0; I! = Message. length; I ++ ){
TXT = TXT + "<span style = 'position: relative; 'id = 'n'" + I + "'>" + message. charat (I) + "</span> "};
Jump. innerhtml = txt;
TXT = "";
Jump1a ()
}
Else {
Alert ("Http://www.jsshow.com")
}
}

Function jump1a (){
Nfinal = (document. getelementbyid )? Document. getelementbyid ("N0"): Document. All. N0
Nfinal. style. Left =-num2;
If (num2! = 9 ){
Num2 = num2 + 3;
SetTimeout ("jump1a ()", 50)
}
Else {
Jump1b ()
}
}

Function jump1b (){
Nfinal. style. Left =-num2;
If (num2! = 0) {num2 = num2-3;
SetTimeout ("jump1b ()", 50)
}
Else {
Jump2 ()
}
}

Function jump2 (){
TXT = "";
For (I = 0; I! = Message. length; I ++ ){
If (I + num>-1 & I + num <7 ){
TXT = TXT + "<span style = 'position: relative; top:" + mes [I + num] + "'>" + message. charat (I) + "</span>"
}
Else {TXT = TXT + "<span>" + message. charat (I) + "</span> "}
}
Jump. innerhtml = txt;
TXT = "";
If (num! = (-Message. Length )){
Num --;
SetTimeout ("jump2 ()", 50 )}
Else {num = 0;
SetTimeout ("jump0 ()", 50 )}}
</SCRIPT>

Add the following content between <body> and </body>:

<H2>
<Div id = "jumpx" style = "color: 33ff33"> </div>
</H2>
<SCRIPT>
If (document. All | document. getelementbyid ){
Jump = (document. getelementbyid )? Document. getelementbyid ("jumpx"): Document. All. jumpx
Jump0 ()
}
Else
Document. Write (Message)
</SCRIPT>

Go to: http://www.blogercn.com/user1/8719/archives/2005/28320.shtml

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.