HTML5 and CSS3 Example tutorials [summary one]

Source: Internet
Author: User

On the behavior and content separation of onclick

    1. Pop-up window mode via chain contact (this method is not recommended!!!) )
<href= ' # '     = ' window.open (' holiday_pay.html ', Winname, ' width= Height = "); >  </a>

If JS is disabled link cannot guide user to the corresponding page, do not assign "#" and similar value to the href attribute

2. General Conditions

<href= ' holiday_pay.html '     = ' window.open (this.href,winname, ' width=300, height = "); >  </a>

3.0 large number of duplicate links, assigning recognizable class names to each link, and adding listeners for each click event by using jquery

<href= "Holiday_pay"  class= "popup">holiday pay </ a >
var links = $ ("A.popup"); Links.clcik (function(event) {   Event.preventdefault ();   window.open ($ (this). attr (' href '));   });

3.1-Way multi-custom data type setting pop-up window size

 <  a  href  = "holiday_pay.html"   Data-width  = ""  Data-heigth  = ""  title  = "Holiday pay"   class  = "Popup"  >  holiday pay  </ a  >  
$ (function() {   $ (". Popup"). Click (function(event) {       Event.preventdefault () ;        var href=$ (this). attr ("href");        var width = $ (this). attr ("Data-width");        var height = $ (this). attr ("Data-height");        var popup = window.open (href, "popup", "height=" +height+ ", width=" +width+ "");}) ;});

HTML5 and CSS3 Example tutorials [summary one]

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.