Genom ett samarbete får alla JavaScript.nu-besökare dessutom 100 kr i rabatt vid beställning.
var anchor = document.createElement("a"); var anchorText1 = "Visa Information"; anchor.appendChild(document.createTextNode(anchorText1)); anchor.onclick = function(event) { var anchorText2 = "Dölj Informationen"; anchor.appendChild(document.createTextNode(anchorText2)); anchorText1.replace(anchorText1, anchorText2);
Posta ett svar: