document.addEventListener("DOMContentLoaded", function(){
var ele = document.querySelectorAll("address");
for(var i = 0; i < ele.length; i++){
var link = "<a href="http://maps.google.com/maps?q=" + encodeURIComponent( ele[i].innerText ) + "" target="_blank">" + ele[i].innerText + "</a>";
ele[i].innerHTML = link;
}
});
2
solved How to convert JQuery to Pure Javascript? [closed]