It looks like you start a button using <div class="btn">
but end it with </a>
, So these basic html tags do not match with each other. I would use <a class="btn" target="_blank" href="#">
to replace the <div class="btn">
.
target="_blank"
is the attribute set for hyperlink(<a>
tag) to open a new window(tab)
From what I know, Glyphicon is actually not related to pop up new window at all. It is just some nice looking button icons that you can put in html to make you page looks better. The actual part of Glyphicon is <i class="glyphicon glyphicon-edit"></i>
. It is just an icon.
To Pop up a new window, you can either choose to use the hyperlink method I provide above, or use the javascript like:
var btns = document.getElementsByClassName('btn');
btns[0].onclick = function(){
window.open('about:blank');
}
the btns[0]
represents the first element of class "btn", and window.open('about:blank')
opens a new blank window