On the behavior and content separation of onclick
- 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]