你只要在提交的action后面,加上一个标志位就好了,比如
提交一就是some.asp?flag=1
提交二就是some.asp?flag=2

解决方案 »

  1.   

    差不多这样子吧
    <!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>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>无标题文档</title>
    </head>
    <body>
    <a href="some.asp?flag=1" onclick="return fun(1)">提交一</a>
    <br/>
    <a href="some.asp?flag=2" onclick="return fun(2)">提交二</a>
    <script type="text/javascript">
    function fun(flag)
    {
    //如果是提交一
    if(flag==1)
    {
    //如果符合条件
    if(true)
    {
    alert("这是提交一");
    return true;
    }
    else
    return false;
    }
    else if(flag==2)
    {
    //如果符合条件
    if(true)
    {
    alert("这是提交二");
    return true;
    }
    else
    return false;
    }
    }
    </script>
    </body>
    </html>
      

  2.   

    <html>
    <script>
    function gourl(ev){
    ev=ev||window.event;
    var target = ev.target || ev.srcElement;
    if (target.tagName=="A"){
    alert(target.id)
    }
    }
    </script>
    <body>
    <a href="some.asp" onclick="gourl()" id="1">asdasd</div>
    <a href="some.asp" onclick="gourl()" id="2">asdasd</div>
    </body>
    </html>
      

  3.   

    谢谢以上两位朋友的帮助,代码都可以得到我要的效果如果希望这两个超级链接的1或2编号传递到some.asp中去,如何在处理函数中实现呢
      

  4.   

    当前页面:<a href="some.asp?clickfrom=1">提交一</a>
    <a href="some.asp?clickfrom=2">提交二</a>
    -----------------------------------------------
    some.asp:
    <%
      dim clickfrom
      clickfrom=request.querystring("clickfrom")
      
      if clickfrom="1" then
        response.write("链接来自[提交一]")
      elseif clickfrom="2" then
        response.write("链接来自[提交二]")
      else
        response.write("链接来源未知")
      end if
    %>
      

  5.   


    6楼的  clickfrom   就是你要的1或2的编号变量
      

  6.   

    还需要单击超级链接后,用户在文本框中输入的email地址要传递到some.asp页面上去
      

  7.   

    现在的问题是,如果form中不加提交按钮,只提供超级链接,如何把用户在文本框中输入的内容传递到 some.asp中去呢
      

  8.   


    和上面一样啊,在后面加参数,比如
    some.asp?flag=1&name=shlinda&age=18在asp里面就可以直接取了,request.querystring("name")这样
      

  9.   

    可是我要的是同一个页面的文本框的值请输入邮件地址:(这里是输入文本框) 提交1  提交2 
    就是单击超级链接后要把文本框的值也传到另一个some.asp页面
      

  10.   

    当前页面:
    <script>
    function chk(s){
      var email=document.getElementById("email").value;
      if(email.length==0){alert('请填写EMAIL!');return; }
      else{
        window.location.href="some.asp?clickfrom="+s+"&email="+escape(email);
      }
    }
    </script>
    EMAIL:<input type=text id=email name=email><br>
    <a id=1 href="#" onclick='chk(this.id);'>提交一 </a>&nbsp;&nbsp;
    <a id=2 href="#" onclick='chk(this.id);'">提交二 </a>
    -----------------------------------------------
    some.asp:
    <%
      dim clickfrom,email
      clickfrom=request.querystring("clickfrom")
      email=request.querystring("email")
     
      if clickfrom="1" then
        response.write("链接来自[提交一]")
      elseif clickfrom="2" then
        response.write("链接来自[提交二]")
      else
        response.write("链接来源未知")
      end if
    %>
      

  11.   

    采用toury 的方法,问题解决了谢谢各位热心的朋友结帖去咯