Esempio:
codice:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <script type="text/javascript" language="javascript"> function AbilitaForm(layerform){ if(layerform==1){ document.getElementById('form_1').style.visibility='visible'; }else{ document.getElementById('form_1').style.visibility='hidden'; } if(layerform==2){ document.getElementById('form_2').style.visibility='visible'; }else{ document.getElementById('form_2').style.visibility='hidden'; } if(layerform==3){ document.getElementById('form_3').style.visibility='visible'; }else{ document.getElementById('form_3').style.visibility='hidden'; } } </script> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>Documento senza titolo</title> </head> <body> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td width="957" height="21"> <form name="form1" action="prova.asp" method="get"> <select name="Select_Form" size="1" onChange="AbilitaForm(this.value);"> <option value="0" selected>Seleziona</option> <option value="1">Form1</option> <option value="2">Form2</option> <option value="3">Form3</option> </select></p> </form> <div id="form_1" style="width:282px; height:200px; position:absolute; left:10px; top:90px; z-index:1; visibility:hidden;"> Contenuto Form Uno</p> </div> <div id="form_2" style="width:285px; height:202px; position:absolute; left:10px; top:90px; z-index:1; visibility:hidden;"> Contenuto Form Due</p> </div> <div id="form_3" style="width:284px; height:200px; position:absolute; left:10px; top:90px; z-index:1; visibility:hidden;"> Contenuto Form Tre</p> </div> </td> </tr> </table> </body> </html>![]()

Rispondi quotando