perfettop ho trovato questa funzione che però lo fa con un link! La devo cambiare in select...come faccio?
codice:if(document.getElementById && document.createElement){ document.write('<style type="text/css">*.toggle{display:none}</style>'); window.onload=function(){ /*le modifiche allo script vanno solo fatte qui*/ Attiva("versa","Versa in Cassa","Versa in Cassa"); Attiva("preleva","Preleva dalla Cassa","Preleva dalla Cassa"); } } function Attiva(id,s1,s2){ var el=document.getElementById(id); el.style.display="none"; var c=document.createElement("div"); var link=document.createElement("a"); link.href="#"; link.appendChild(document.createTextNode(s1)); link.onclick=function(){ link.firstChild.nodeValue = (link.firstChild.nodeValue==s1) ? s2 : s1; el.style.display=(el.style.display=="none") ? "block" : "none"; return(false); } link.onfocus=this.blur(); c.appendChild(link); el.parentNode.insertBefore(c,el); }


Rispondi quotando