commentata creazione dinamica html, prima versione con alert del browser

This commit is contained in:
Matteo Manzinello 2019-05-01 00:27:08 +02:00
parent 6741db11f2
commit 4887c63609
1 changed files with 6 additions and 1 deletions

View File

@ -5,17 +5,22 @@ console.log("mailgo is WIP");
// attivo mailgo su tutti gli elementi
mailtos.forEach(mailto => {
/*
var newDiv = document.createElement("div");
var newContent = document.createTextNode("hi!");
newDiv.appendChild(newContent);
mailto.parentNode.insertBefore(newDiv, mailto.nextSibling);
*/
mailto.addEventListener(
"click",
event => {
event.preventDefault();
alert("clicked");
let r = confirm("You have clicked mailto: " + mailto.href);
if (r === true) {
location.href = mailto.href;
}
},
false
);