Common JS instances: QQ...

Source: Internet
Author: User

1. the QQ status is displayed on the web page. Click it to chat without being a friend.

<A target = "_ blank" href = "http://wpa.qq.com/msgrd? V = 1 & uin = ******* & Site = ioshenmue & menu = yes "> Border = "0"> </a>

'*' Is replaced by the online QQ number.

 

Two statuses

After clicking:

 

2. word selection Baidu search function

 

<! Doctype HTML public "-// W3C // dtd html 4.01 transitional // en">
<HTML>
<Head>
<Meta http-equiv = "Content-Type" content = "text/html; charset = gb2312">
</Head>
<Body>

<Script language = JavaScript>
<! --
Document. Body. onload = adddiv;
Document. onmousedown = recordobj;
Document. ondblclick = dbclick;
Document. onmouseup = showselect;
VaR starobj, IsDB = false, allow = true;
Function isallow ()
{
If (allow ){
Allow = false;
Alert ('word search disabled ');
}
Else {
Allow = true;
Alert! ');
}
}
Function dbclick ()
{
IsDB = true;
}
Function recordobj ()
{
Starobj = event. srcelement;
}
Function showselect (){
VaR STR = "";
If (event. srcelement. tagname! = "A" & event. srcelement. tagname! = "Input" & event. srcelement = starobj &&! IsDB & allow)
{
VaR otext = Document. selection. createRange ();
If (otext. Text. length> 0)
{
STR = otext. text;
Otext. Text = "bub" + otext. Text + "EUE ";
}

Otext. Select ();
Event. srcelement. innerhtml = event. srcelement. innerhtml. replace ("bub", "<u style = 'font-weight: bold; color: # ff3366 '> "). replace ("EUE", "</u> ");
}
Searchgoogle (STR)
IsDB = false;
}
Function searchbaidu (STR)
{
VaR OBJ = Document. getelementbyid ("searchbaidu ");
If (Str. length> 0)
{
OBJ. style. Display = "Block ";
OBJ. style. Position = "absolute ";
OBJ. style. zindex = 999;
OBJ. style. postop = Document. Body. scrolltop + event. y-25;
OBJ. style. posleft = Document. Body. scrollleft + event. x + 5;
OBJ. style. widht = 80;
OBJ. innerhtml = "<a target = _ blank href = http://www.baidu.com/baidu? WORD = "+ STR +" style = 'border-Right: # fff1ca thin solid; border-top: # fff1ca thin solid; font-weight: bold; border-left: # fff1ca thin solid; clip: rect (Auto auto); color: #666666; border-bottom:
Royalblue thin solid; Background-color: # fff1ca; text-Decoration: none'> what is this? </A> ";
}
Else
{
OBJ. style. Display = "NONE ";
}
}
Function adddiv ()
{
VaR mobj = Document. createelement ("Div ");
Mobj. ID = "searchbaidu ";
Document. Body. appendchild (mobj );
}
// By qpsh. com -->
</SCRIPT>
<Input type = "button" onclick = "isallow ()" value = "Disable/enable the word selection function">

Basketball, Dota

</Body>
</Html>

 

3. tag switching(Refer to www. qpsh. com)

<HTML>

<Head>
<Meta http-equiv = "Content-Type" content = "text/html; charset = gb2312">
<Title> webpage effect www. qpsh. com </title>
<Style>
Body {
Font-family: "";
Font-size: 12px;
Color: #525252;
}
TD {
Font-family: "";
Font-size: 12px;
Color: #525252;
}
A: link {
Color: #525252;
Font-size: 12px;
Text-Decoration: none;
}
A: visited {
Color: #525252;
Font-size: 12px;
Text-Decoration: none;
}
A: hover {
Color: # ff6600;
Font-size: 12px;
Text-Decoration: underline;
}
. Gd1 {
Font-family: "";
Font-size: 12px;
Color: # ff0000;
}

. Sec11 {border-Right: # c5e1fe 1px solid; border-top: # c5e1fe 1px solid; border-left: # c5e1fe 1px solid; cursor: hand; color: # 01499a; border-bottom: # c5e1fe 1px solid; Background-color: # ffffff}
. Sec21 {border-Right: # c5e1fe 1px solid; border-top: # c5e1fe 1px solid; font-weight: 800; color: # 01499a; border-left: # c5e1fe 1px solid; border-bottom: # c5e1fe 1px solid; cursor: hand; Background-color: # e6eef7; Background: URL ('/icon/098.gif') No-repeat}
. Main_tab {background-color: # ffffff}
</Style>
<! -- JavaScript part -->
<Script language = JavaScript>
Function secboard (N)
{
For (I = 0; I <sectable. cells. length; I ++)
Sectable. Cells

[I]. classname = "sec11 ";
Sectable. cells [N]. classname = "sec21 ";
For (I = 0; I <maintable. tbodies. length; I ++)
Maintable. tbodies

[I]. style. Display = "NONE ";
Maintable. tbodies

[N]. style. Display = "Block ";
}
</SCRIPT>
</Head>

<Body>
<P align = "center"> This example is easy to demonstrate. You have set only two column switches. You can add columns as needed! Modify CSS to make it more suitable for your website <br>
<Br>
<A target = "_ blank" href = "http://www.qpsh.com/"> For more information, see </a> </P>
<Div align = "center">
<Table border = "0" width = "200" cellpadding = "0" cellspacing = "0" style = "border-collapse: collapse "Height =" 145 "id =" table7 "bgcolor = # ecf5ff>
<Tr>
& Lt; TD Height = "145" & gt;
<Div align = "center">
<Table border = "0" width = "200" cellpadding = "0" style = "border-collapse: collapse" Height = "140" id = "table107">
<Tr>
<TD Height = "25">
<Div align = "center">
<Table border = "0" width = "220" cellpadding = "0" style = "border-collapse: collapse" Height = "22" id = sectable>
<Tr>
<TD class = sec21 onmouseover = secboard (0) width = "50%">
<P align = "center"> menu effects </TD>
<TD class = sec11 onmouseover = secboard (1) width = "50%">
<P align = "center"> webpage special effects </TD>
</Tr>
</Table>
</Div>
</TD>
</Tr>
<Tr>
& Lt; TD Height = "115" & gt;
<Div align = "center">
<Table id = maintable border = "0" width = "195" cellpadding = "0" style = "border-collapse: collapse" Height = "115">
<Tbody style = "display: Block"> <tr>
<TD Height = "145"> <Div align = "center">
<Table border = "0" width = "205" cellpadding = "0" style = "border-collapse: collapse" Height = "138">
<Tr>
<TD Height = "23" width = "15" valign = "Middle">
· </TD>
<TD Height = "23" width = "180">
<A target = "_ blank" style = "color: # 01499a" href = "http://www.qpsh.com/javascript/showpage2277.htm"> awesome XP style webpage shortcut menu </a> </TD>
</Tr>
<Tr>
<TD Height = "23" width = "15">
· </TD>
<TD Height = "23" width = "180">
<A target = "_ blank" style = "color: # 01499a" href = "http://www.qpsh.com/javascript/showpage2276.htm"> General Level 3 linkage menu </a> </TD>
</Tr>
<Tr>
<TD Height = "23" width = "15">
· </TD>
<TD Height = "23" width = "180">
<A target = "_ blank" style = "color: # 01499a" href = "http://www.qpsh.com/javascript/showpage2275.htm"> pretty fun right-click the pop-up menu </a> </TD>
</Tr>
<Tr>
<TD Height = "23" width = "15">
· </TD>
<TD Height = "23" width = "180">
<A target = "_ blank" style = "color: # 01499a" href = "http://www.qpsh.com/javascript/showpage2274.htm"> portrait navigation bar instance designed with CSS </a> </TD>
</Tr>
<Tr>
<TD Height = "23" width = "15">
· </TD>
<TD Height = "23" width = "180">
<A target = "_ blank" style = "color: # 01499a" href = "http://www.qpsh.com/javascript/showpage2272.htm"> code for setting a website as a homepage </a> </TD>
</Tr>
<Tr>
<TD Height = "23" width = "195" colspan = "2">
<P align = "right"> <font color = "# 01499a">
<A target = "_ blank" href = "http://www.qpsh.com/listpage/102_1.htm">
<Font color = "# 01499a"> more </font> <font color = "# 01499a" face = "Arial" >>></font> </a> </font> </TD>
</Tr>
</Table>
</Div> </TD>
</Tr> </tbody>
<Tbody style = "display: none"> <tr>
<TD Height = "145"> <Div align = "center">
<Table border = "0" width = "205" cellpadding = "0" style = "border-collapse: collapse" Height = "138">
<Tr>
<TD Height = "138" width = "195" style = "line-Height: 150%">

<B>
<A target = "_ blank" href = "http://www.qpsh.com/"> webpage effect </a> </B> is a special effect or function of using program code in the web page. technology, it makes the webpage active and increases the website's affinity. Add special effects to webpages, learning to add <a target = "_ blank" href = "http://www.qpsh.com/"> webpage effects </A> process can inspire web beginners to learn more about the structure of HTML language. </TD>
</Tr>
</Table>
</Div> </TD>
</Tr> </tbody>
</Table>
</Div>
</TD>
</Tr>
</Table>
</Div>
</TD>
</Tr>
</Table>
</Div>
</Body>

</Html>

This code is provided by <a href = http://www.qpsh.com> Web effect Network </a>

4. simple deletion confirmation

<Script language = "">
Function winconfirm (){
Question = confirm ("You will delete this user, this operation cannot be restored, OK? ")
If (question! = "0 "){
Window. Open ("http://www.dota.com ")
}
}
</SCRIPT>

<A href = "javascript: winconfirm ()"> Delete </a>

 

5.

01. Make the background image not scroll

Internet Explorer supports a body attribute bgproperties, which can prevent the background from rolling:

<Body background = "Image File" bgproperties = "fixed">

02. Make your webpage unable to be saved

<NoScript> <IFRAME src = *> </iframe> </NoScript>

03. Make the background of documents in the IFRAME framework transparent

<IFRAME src = "about: <body style = 'background: transparent'>" allowtransparency> </iframe>

04. Right-click prohibited:

<Body oncontextmenu = "Return false" ondragstart = "Return false" onselectstart = "Return false" onselect = "document. selection. empty () "oncopy =" document. selection. empty () "onbeforecopy =" Return false "onmouseup =" document. selection. empty () ">

05. Will the page be automatically refreshed immediately after you enter the page?

<Meta http-equiv = "refresh" content = "120; url = http://www.qpsh.com">

Http://www.qpsh.com, this is your own web site.

06. Open a window to maximize

<Script language = "JavaScript">

<! -- Begin

Self. moveTo (0, 0)

Self. resizeTo (screen. availwidth, screen. availheight)

// End -->

</SCRIPT>

07. can I hide the IFRAME scroll bar? I know three methods:

(1) set IFRAME scrolling = "no"

(2) apply overflow: hidden to the contained page body

(3) add scroll = "no" to the body tag of the contained page"

08. Add background music

<Bgsound src = "mid/windblue [1]. Mid" loop = "-1"> only applicable to IE
<Embed src = "music. Mid" autostart = "true" loop = "true" hidden = "true"> applicable to Netscape, ie, and TT

09. Embedded webpage

<IFRAME name = "TT" src = "01a.html" width = "450" Height = "287" scrolling = "Auto" frameborder = "0"> </iframe>

10. Jump

<Meta http-equiv = "refresh" content = "3366url1_list.htm">

11. Scroll
<Marquee direction = up Height = 146 onmouseout = start () onmouseover = stop () scrollamount = 4> </marquee>

12. line separation

<HR noshade size = 0 color = # c0c0c0>

13. Excessive

<Meta http-equiv = "Page-Exit" content = "revealtrans (duration = 3, transition = 5)">

The duration value is the dynamic transition time of the webpage, in seconds.

Transition is a transitional mode. Its value ranges from 0 to 23, corresponding to 24 transition modes respectively. See the following table:

0-box contraction 1-box radiation

2 circular contraction 3 circular radiation

4 From bottom up 5 from top down

6 from left to right 7 from right to left

8 vertical blinds 9 horizontal blinds

10 horizontal blinds 11 vertical blinds

12 dissolve at will 13 expand from left and right ends to the middle

14 expand from the center to the left and right sides 15 expand from the up and down ends to the middle

16. expand from the middle to the bottom. 17. expand from the top right to the bottom left.

18 expand from bottom right to top left 19 from top left to bottom right

20. Expand the 21 horizontal lines from the lower left corner to the upper right corner.

22 vertical linear expansion 23 random generation of a transitional mode

15. How do I control the explicit hiding of the horizontal and vertical scroll bars?

<Body style = "overflow-Y: hidden"> remove the X axis.
<Body style = "overflow-X: hidden"> remove the Y axis.
<Body scroll = "no"> hide

16. How to add Flash animation to frontpage2000?

In frontpage2000, click [insert]-> [advanced]-> [plug-in]. In the displayed window, set the Flash file size and other information, and click OK.

17. The format for adding annotations is:
<! -[Comment...] -->

18. How can I add an e-mail link to the webpage and display the predefined topic?

<A href = "mailto: Email@263.net? Subject = topic "> ...... </A>

19. Define the keywords of this webpage. You can add the following code to

<Meta name = "keywords" content = "China, webpage special effect field, business, net">

The content contains keywords. You can set them by yourself.

Here is a tip. You can repeat a word to improve the ranking position of your website, such:

<Meta name = "keywords" content = "China, China, China">

20. Add to favorites:

<A href = "javascript: window. External. AddFavorite ('HTTP: // link', 'description');"> Add to favorites </a>

21. Set as homepage:

<A href = # onclick = This. style. behavior = 'url (# default # homepage) '; this. setHomePage ('HTTP: // link');> set as homepage </a>

22. Customize the small icon in front of the browser address bar:

A: Add the following statement to the

LINK rel = "shortcuticon" href = "http ://... /Icon. ICO ">

You can. The icon. ICO is a 16x16 icon file. The color must not exceed 16.

23. Place the scroll bar on the left of the browser window.

A: In <body>, add dir = RTL, that is, <body dir = RTL>.

Updating ....

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.