Details about five special JavaScript webpage Effects

Source: Internet
Author: User

Do you know common JavaScript webpage effects? Here is a brief description. For example, when you point the mouse to a subtitle, the subtitle stops and links it. If you move the mouse pointer to the subtitle and Scroll it again, you can use the above Code to implement it.

JavaScript webpage effects 5

Dynamic subtitles

Code: Add as needed

 
 
  1. <marqueeonmouseovermarqueeonmouseover=this.stop()
  2. onmouseout=this.start()> 
  3.  

Features: when you point your mouse to a subtitle in a JavaScript webpage effect, the subtitle stops and links it. When you move the mouse pointer to the subtitle and Scroll it, you can use the above Code.
Extension: a dynamic subtitle has a property "direction", which controls the direction of subtitle scrolling. you can scroll up by changing the property of "direction" to "up, similarly, if it is changed to "down", it will scroll down, so "left" and "right" are naturally left and right.

Auto refresh

Code: add between webpages

 
 
  1. <metahttpequivmetahttpequiv="refresh"content="15;url=cesi.htm"> 
  2.  

Explanation: If you have a welcome page on your homepage and want it to be displayed 15 seconds later, you can use the above Code to change the time you want. Next, let's take a look at how to close the window in JavaScript webpage special effects.

Close Window

① By button

Code: Add as needed

 
 
  1. <INPUTonclickINPUTonclick = window. close () type = buttonvalue = close the window>
  2.  

Explanation: the result of this Code is to close the current page with a button.

② Link

Code: Add as needed

 
 
  1. <Ahrefahref = "#" onClick = "window. close ();
  2. Returnfalse; "> close the window
  3.  
  4.  

Explanation: the result of this Code is a link to close the current page.

③ Timed Shutdown

Code: add between webpages

 
 
  1. <scriptlanguagescriptlanguage="JavaScript"> 
  2.  

Explanation: after this code is added, the webpage will be automatically closed 3 seconds after it is opened (3000 represents 3000 milliseconds, that is, 3 seconds ).

Reverse sorting

Code: Add as needed

 
 
  1. <Bdodirbdodir = "rtl"> reverse Columns
  2.  

Features: What do you do when you need to reverse the line in JavaScript webpage special effects? Is it input one by one? You only need to use the above Code.

Web page underline

Code: add between webpages

 
 
  1. <StyleTypeStyleType="text/css"> 
  2.  

Introduction: many of my friends think that the underlines under those links are very eye-catching. After the above Code is added, the underscores are only given when the visitor points to the link.
 

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.