<form name="form1" method="post" action="">
<input type="submit" name="Submit1" value="sub1">  
<input type="submit" name="Submit2" value="sub2">
</form>
<%
a=request("submit1")
b=request("submit2")
if a="sub1" then 
response.write"提交的是sub1按钮" 
end if
if b="sub2" thenresponse.write"提交的是sub2按钮"
end if
%>

解决方案 »

  1.   

    这个我也知道啊,我要的是在客户端判别 :O
    anyway thank you every much!!
      

  2.   

    <script language="javascript">
    function summit_put()
    {
    if (form1.summit1.value="sub1") 
    response.write"提交的是sub1按钮" ;if (form1.summit2.value="sub2")
    response.write"提交的是sub2按钮";
    }
    </script>另外提一个思路,可以把summit定义为一个数组控件,
    <form name="form1" method="post" action="">
    <input type="submit" name="Submit" value="sub1">  
    <input type="submit" name="Submit" value="sub2">
    </form>
    然后用脚本
    select case form1.summit[i]
    case "sub1": "提交的是sub1按钮"
    case...............
      

  3.   

    <html>
    <head>
    <script language="javascript">
    function chk(button)
    {
    alert(button.name);
    }
    </script>
    </head><body>
    <form name="form1" method="post" action="">
      <input type="text" name="textfield">
      <input name="s1" type="submit" id="s1" value="提交" onClick="chk(this)">
      <input name="s2" type="submit" id="s2" value="提交" onClick="chk(this)">
    </form>
    </body>
    </html>
      

  4.   

    这样可以吧!<html>
    <head>
    <script language="javascript">
    function chk(button)
    {
    alert(button.name);document.form1.submit();}
    </script>
    </head><body>
    <form name="form1" method="post" action="">
      <input type="text" name="textfield">
      <input name="s1" type="button" id="s1" value="提交" onClick="chk(this)">
      <input name="s2" type="button" id="s2" value="提交" onClick="chk(this)">
    </form>
    </body>
    </html>
      

  5.   

    这样也不行,因为我还想把 submit的值传到后台去
      

  6.   

    客户端javascript 脚本用每个submit的id来识别,每个submit用不同的id
    服务器用submit的value 来识别,每个submit 用不同的value,但是名字用一样的