code.progysm.com

window.open

Description:
	Ouvre une fenĂȘtre ou un onglet

Syntaxe:
	Window window.open(String url[, String name[, String option]])

Retour:
	Objet de type Window

Exemples:
	window.open("http://example.com/")

Ancien:
	http://www.sitepoint.com/article/1041/3 : New-Window Links in a Standards-Compliant World : comment ouvrir une nouvelle fenĂȘtre en respectant les standards

		<a href="http://example.com" rel="newwindow"></a>
		function newWindow(ev) { window.open(this.href); ev.preventDefault(); }
		Array.from(document.querySelectorAll('a[rel="newwindow"]')).forEach(function(a) { a.addEventListener('click', newWindow); });