Ciao a tutti, ho uno script che aggiunge dei link attraverso js che funziona su firefox ma non su explorer:
Come faccio a farla funzionare anche su explorer?codice:function test() { var list_link = document.getElementsByClassName("clic"); var re = /^www.[a-z0-9_.-]+.[a-z]{2,3}$/i for (var i=0; i<list_link.length; i++) { var text = list_link.item(i).innerHTML; if (text.match(re)) { list_link.item(i).removeChild(list_link.item(i).firstChild); var a = document.createElement('a'); a.setAttribute('href', "http://"+text); a.setAttribute('target', "_blank"); var t = document.createTextNode(text); a.appendChild(t); list_link.item(i).appendChild(a); } } }
Grazie per ogni suggerimento

Rispondi quotando