Na przykład skrypt który ma za zadanie podmieniać odnośniki w postaci obrazków po najechaniu na nie:
window.onload = rolloverInit; function rolloverInit() { for (var i=0; i<document.images.length; i++) { if (document.images[i].parentNode.tagName == "A" ) { setupRollover(document.images[i]); } } } function setupRollover(thisImage) { thisImage.outImage = new Image(); thisImage.outImage.src = thisImage.src; thisImage.onMouseOut = function () { this.src = this.outImage.src; } thisImage.overImage = new Image(); this.Image.overImage.src = "strzalka1.jpg"; this.Image.onMouseOver = function() { this.src = this.overImage.src; } }
i jakiś sobie link:
nie działa i nie wiem o co chodzi. Any help?
