Page 1/5 of some useful and necessary small script code

Source: Internet
Author: User

Script 1: automatically play audio after entering the home page
<Embed src = "pnm: // 10.13.31.90 /~ Kayvin/mihunji. rm "hidden = true autostart = true loop = true> Script 2: when you enter the home page, you can click
<Script>
Self. moveTo (0, 0)
Self. resizeTo (screen. availWidth, screen. availHeight)
</Script>

Script 3: displays the current time script

<Script language = vbscript> document. write now </script>

Script 4: displays the last modified time script.

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

Script 5: set as homepage, add as favorites, add to channel, start outlook mail

<A style = "cursor: hand"
Onclick = "this. style. behavior =" url (# default # homepage )";
This. setHomePage (http://jb51.net/); ">"> set to home </a>

<A style = "cursor: hand"
Onclick = "window. external. AddFavorite (location. href, document. title);"> Add to favorites </a>

<A href = javascript: window. external. addChannel ("typhoon. cdf")> Add channel </a>
<A href = douxy001@gmail.com> contact me </a>

Script 6: the current time is dynamically displayed in the status bar.


<Script>
Function see (){
Window. setTimeout ("see ()", 1000 );
Today = new Date ();
Self. status = today. toString ();
}
</Script>
<Body onload = see ()>


Script 7: Close the window script


<A href = javascript: close ()> [close the window] </a>

Script 8: press the F12 key and return directly to the homepage.


<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: backward, refresh, and forward


<Input type = button value = backward onclick = history. go (-1)>

<Input type = button value = Refresh onclick = history. go (-0)>

<Input type = button value = forward onclick = history. go (+ 1)>


Script 10: set the time to pop-up window, 4000 = 4 seconds, of course, you can customize


<Script> function l ()
{
Window. open ("10.13.31.90 /~ Kayvin/"," name "," width = 500, height = 150, border = 0 ")
}
SetTimeout ("l ()", 4000)

</Script>

Related Article

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.