nostradamus1915
10-04-2011, 15:20
Salve a tutti, sto tentando di realizzare una pag html avente un form comprendente 3 submit. A seconda del submit viene impostato un certo valore per la var "tasto". Ora nella pag destinataria, come faccio a recuperare il valore di "tasto"?
Posto il codice:
<html>
<head>
<script type="text/javascript">
var tasto=null;
</script>
</head>
<body>
<form action="pag_destinataria.php" method="post">
<input type="submit" value="Tasto 1" onclick="tasto=1">
<input type="submit" value="Tasto 2" onclick="tasto=2">
<input type="submit" value="Tasto 3" onclick="tasto=3">
</form>
</body>
</html>
Ora, come faccio nella pag destinataria a recuperare il valore di "tasto"?
Grazie :)
Posto il codice:
<html>
<head>
<script type="text/javascript">
var tasto=null;
</script>
</head>
<body>
<form action="pag_destinataria.php" method="post">
<input type="submit" value="Tasto 1" onclick="tasto=1">
<input type="submit" value="Tasto 2" onclick="tasto=2">
<input type="submit" value="Tasto 3" onclick="tasto=3">
</form>
</body>
</html>
Ora, come faccio nella pag destinataria a recuperare il valore di "tasto"?
Grazie :)