<html>
<head></head>
<body>
<form name="form1" method="post" action="">
  <input type="submit" name="Submit" value="提交" onClick="javascript:alert(this.value);">
</form>
</body></html>

解决方案 »

  1.   

    <script>
    function chk(strname){
    if (strname=="add")
     alert(strname);
    if (strname=="del")
     alert(strname); 
    }
    </script>
    <input type="submit" name="add" value="提交" onclick="chk(this.name);">
    <input type="submit" name="del" value="提交" onclick="chk(this.name);">
      

  2.   

    <style>
    input{t:expression(this.onclick=function(){check(this)})}
    </style>
    <script>
    function check(obj)
    {
       if(obj.name=="add")
         {
            obj.parentNode.action='1.asp?action=add';
         }
    }
    </script>
    <body>
    <form>
    <input type="submit" name="add" value="提交">
    <input type="submit" name="del" value="提交">
    </form>
    </body>