好象是不行,因为form只有一个action。

解决方案 »

  1.   

    一个form可以有多个提交按钮,你对这两个按钮写两个onclick事件,在onclick事件里改变action的值就行,比如按“预览”在onclick事件里写上这句form.action="preview.jsp",按“提交”在onclick事件里写上form.action="view.jsp"
      

  2.   

    当然可以了:
    <form name="form" method="post" action="" onsubmit="mxh.value=event.srcElement.value">
    <textarea name="content" cols="85" rows="18"></textarea>
    <input  type="submit"  value="预   览" >
    <input  type="submit"  value="提   交" >
    <input type=hidden name=mxh>
    </form>
    提交后根据mxh的value拉判断点的是哪个按钮。分别进行处理
      

  3.   

    <html>
    <head>
    <title>Test</title>
    <%@ page contentType="text/html; charset=gb2312" %>
    <script language="JavaScript">
        function go_Jsp(obj)
        {
            if (obj.btnFlag.value=="1")
     form1.action="preview.jsp";
            if (obj.btnFlag.value=="2")
     form1.action="view.jsp";
        }
    </script>
    </head>
    <body bgcolor="#FFFFFF" text="#000000">
    <form name="form1" method="post" action="" onsubmit="return go_Jsp(this)">
        <textarea name="content" cols="85" rows="18"></textarea>
        <input type="hidden" name="btnFlag">
        <input  type="submit"  value="预   览" onClick="btnFlag.value='1';">
        <input  type="submit"  value="提   交" onClick="btnFlag.value='2';">
    </form>
    </body>
    </html>
      

  4.   

    我觉得net_lover(孟子E章) 不是这个意思哦,应该是在提交的jsp中来判断按钮属性哦!
      

  5.   

    <html>
    <head>
    <title>Test</title>
    </head>
    <body bgcolor="#FFFFFF" text="#000000">
    <form name="form1" method="post" action="abc.jsp" >
        <textarea name="content" cols="85" rows="18"></textarea>
        <input type="hidden" name="btnFlag">
        <input name="a" type="submit"  value="预览" >
        <input name="a" type="submit"  value="提交" >
    </form>
    </body>
    </html>
    abc.jsp
    if (request.getParameter("a")="预览"){
    }if (request.getParameter("a")="提交"){
    }