怎么让里面的form 提交对应的action
<%@page contentType="text/html;charset=UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<html>
<head>
<title>用户注册</title>
</head> <body> <center>
<form onsubmit="return validateAddAdminForm(this);" method="post"
action="addTeacher.action" >
<table width="776" border="0" align="center" cellpadding="0"
cellspacing="0">
<tr>
<td align="left" style="border-bottom: 1px solid #E5E5E5">
<br>
</td>
</tr>
<tr>
<td height="25" align="left">
添加班主任信息
</td>
</tr>
</table>
<!--书签插入位置-->
<table width="776" border="0" cellspacing="0" cellpadding="0">
<tr>
<td id="card1" width="776" align="center" bgcolor="#3D84CD"
style="cursor: hand; color: #ffffff; font-size: 14px; font-weight: bold">
基本信息
</td>
</tr>
</table>
<table width="776" border="0" cellspacing="0" cellpadding="0"
style="border: 1px solid #E5E5E5" >
<tr>
<td align="center"> <table width="764" border="0" cellspacing="0" cellpadding="0">
<tr> <td colspan="4" align="left">
<font style="color: #FAAD45">*</font> 为必填信息:
</td>
</tr>
</table>
<table width="764" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20" height="25" align="center"
style="color: #FAAD45">
*
</td>
<td width="100" height="25" align="center">
班主任名字:
</td> <td width="177" height="25" align="left">
<span class="table_k_bg1"> <input type="text"
class="input" id="teacherName" name="teacherName" maxlength="20"
size="20" /> </span>
</td> <td align="left" width="467">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<font color="blue"><div id="result"></div>
</font>
</td>
</tr>
</table>
</td>
</tr>
</table>

解决方案 »

  1.   

    是不是 根据就近原则
     <form id="fm1">  
             <form id="fm2">  
               <input type="submit">
             </form>
        <input type="submit">
    </form>
    fm1 的提交按钮时最靠近它的那个submit?
    请教了.
      

  2.   

    嵌套的时候内部<form>被忽略.
    不要用嵌套的FORM吧:
    <input type=submit onsubmit="return false;" onclick="var f=this.form; f.action='upload.action'; f.method='POST'; f.enctype='multipart/form-data'; f.submit();"/>
      

  3.   

    form是不能嵌套的,否则html都是语法错误,如果用dw编辑,你会看到不匹配的标记。 
      

  4.   

    内部的form不用写,是这个意思吗