Search


Latest Visitors


Photos

newtargetweb's photos flickr

View blog authority
Creative Commons License

11 giugno 2008

setAttribute, onclick e IE: come risolvere..

by Matteo Crippa javascript, programming .   

Son ore che sto impazzendo con IE per far funzionare un banale script javascript che aggiorni ad hoc un tag onclick di un anchor.

Ecco allora un post pro-memoria (per me) e spero utile per altri che stanno per incappare nel medesimo problema:

anchor = document.getElementById('link');
if (window.addEventListener) 
anchor.addEventListener("onclick","alert('ciao')");
else
anchor.onclick = function(){ alert('ciao'); }

LISTEN

Hear this post

Related Posts

Random Posts


Nessun commento »

No comments yet.

RSS feed dei commenti a questo articolo. TrackBack URL

Leave a comment.



Invita i tuoi amici a partecipare nelle discussioni di Posting IT!