codice:<html> <head> <title>Programma</title> <script> function sposta() { if(document.modulo.casella.value.length >0){ document.modulo.casella2.value =document.modulo.casella.value; }else{ document.modulo.casella.value =document.modulo.casella2.value; } } </script> </head> <body> <form name="modulo"> <fieldset> <legend>Sposta testo</legend> <inputtype="text"name="casella"> <inputtype="text"name="casella2"> <inputtype="button"value="Sposta il testo"onclick="sposta()"> </fieldset> </form> </body> </html>

Rispondi quotando