var labels = document.querySelectorAll(".popup"), total = labels.length; for (var i = 0; i < total; i++) labels[i].addEventListener("click", function(){ var enlace = this.getAttribute("data-link"), titulo = this.innerHTML; window.open(enlace, titulo, "width=750, height=550"); }, false);
<label class = "popup" data-link = "http://www.google.com">Google</label> <label class = "popup" data-link = "http://www.yahoo.com">Yahoo</label> <label class = "popup" data-link = "http://www.bing.com">Bing</label> <label class = "popup" data-link = "http://www.terra.com">Terra</label> <label class = "popup" data-link = "http://www.twitter.com">Twitter</label>
.popup{ display: block; background: lightsteelblue; color: white; width: 5em; text-align: center; margin-bottom: .5em; cursor: pointer; } .popup:active{ background: lightcyan; }