ulteriore esempio
codice:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>Pagina senza titolo</title>
<script language="javascript" type="text/javascript">
// <!CDATA[

function Button_onclick(v) 
{
    var f = v.form;
    
    switch(v.id)
    {
        case "Button1":
        f.action = "a.aspx?variabile=valore";
        break;
        
        case "Button2":
        f.action = "c.aspx?variabile=valore";
        break;
        
    }
    f.submit();
}

// ]]>
</script>
</head>
<body>
    <form id="form1" action="?" method="post">
        <input id="Button1" type="button" value="button1"  onclick="return Button_onclick(this)" />
        


        <input id="Button2" type="button" value="button2" onclick="return Button_onclick(this)"  />
    </form>
</body>
</html>