Il tuo carrello è attualmente vuoto!
FAQ Javascript
Un elenco di risposte alle domande più frequenti relative a Javascript
Apri il terminale da VS Code e digita il seguente comando:
npm start
(NPM sta a significare Node Package Manager)
Supponendo di avere un link con ID come di seguito:
<a href="https://example.com" id="openSmallWindow">Open Small Window</a>
Aggiungere il seguente script:
<script>
document.addEventListener("DOMContentLoaded", function () {
document.getElementById("openSmallWindow").addEventListener("click", function (event) {
event.preventDefault(); // Prevent default link behavior
openSmallWindow(this.href, 300, 400);
});
});
function openSmallWindow(url, width, height) {
window.open(url, '_blank', `width=${width},height=${height},resizable=yes,scrollbars=yes`);
}
</script>