eh dai ok divertiamoci![]()
codice:<body> <div id="ciao">ciao ciao</div> <div id="hallo">hallo hallo</div> test <input type="checkbox" onclick="VediCheck('ciao', 'hallo', this)" /> <script> function VediCheck(id,id2,ck){ String.prototype.x=function(){return !(this=='none')} Boolean.prototype.x=function(){return (this.valueOf())?'none':'block';}; if(ck.nodeName=='INPUT'){ document.getElementById(id2).style.display=(document.getElementById(id).style.display=(ck.checked).x()).x().x(); } else{ document.getElementById(id2).style.display=(document.getElementById(id).style.display=document.getElementById(id).style.display.x().x()).x().x(); }; } </script> </body>

Rispondi quotando