I want to create a button and the link to open it is a div
that is in my site for example in JavaCcript
var elemento = document.getElementById('teste').innerHTML;
button2.onclick = function() {
window.open(elemento)
}
var elemento
receives the URL and when I click the button it opens the url of the ('teste').innerHTML
element
How do I do this? This does not work.