Sample Code is displayed in the lower-right corner of js.

Source: Internet
Author: User

Sample Code is displayed in the lower-right corner of js.

This article explains the sample code of the pop-up advertisement information box in the lower right corner of the webpage and shares it with you for your reference. The details are as follows:

:

Code:

<! DOCTYPE html> 

The above code implements the functions we need. The following describes the implementation process briefly.
Implementation principle:
The principle is very simple. Here is a brief introduction step by step:
1. Place the window in the lower right corner of the page:
The implementation code is as follows:

#winpop { width:200px; height:0px; position:absolute; right:0; bottom:0; border:1px solid #666; margin:0; padding:1px; overflow:hidden; display:none;}

The code above sets the windpop element to absolute positioning, especially setting its right and bottom attribute values to 0, so that it is in the lower right corner of the page, it also sets its height to 0 PX, that is, it is hidden by default.
2. How to display and hide:
Call the changeH () function once every specified time through the setInterval () timer function. This function can continuously set the windpop height based on the passed value, in this way, the window appears and disappears smoothly. The principle is basically the same as above. I will not introduce it here.

The above is the implementation code in the pop-up box in the lower right corner, hoping to help you learn javascript programming.

Articles you may be interested in:
  • Js implements the window pop-up in the lower right corner
  • In the lower-right corner of js, a window is displayed. Click to close the window.
  • Video advertisement code in the lower right corner of Js (Baidu window)
  • JS imitates the prompt box code in the lower right corner of MSN
  • The lower right corner of js with excellent compatibility with floating ad code
  • Lower right corner of js with floating ad code (compatible with multiple browsers)
  • Sample Code for js
  • Example of a prompt box in the lower right corner of the js webpage
  • Js Implementation of the prompt box in the lower right corner

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.