There is a list of links with the type = "popup" attribute.
document.querySelector("[type=popup]").onclick = function() { window.open("this.href", "_blank", "width=600,height=600"); return false } <a type="popup" href="https://www.google.ru/">Google</a> <a type="popup" href="https://www.yandex.ru/">Яндекс</a> After clicking, you need to open links in a new window.
What did I do:
document.querySelector("[type=popup]").onclick = function() { window.open("this.href", "_blank", "width=600,height=600"); return false } The window opens, but the link is missing, ie the link is this.href.
How to open a link in a new window?