在服务器外形ASP.Net第一内部窗体不会POST [英] ASP.Net First inner form in Server Form doesn't POST
本文介绍了在服务器外形ASP.Net第一内部窗体不会POST的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
<form runat="server" id="outer" >
<form name="inner1" method="POST" action="http://www.somesite.com/page.php" >
<input type="text" size="7" name="o" id="origin" value="london" ></input>
<input type="submit" name="getDirectionsBtn" id="btnSubmit" value="Submit" />
<input type="hidden" name="oo" value="p" />
</form>
<form name="inner2" method="POST" action="http://www.somesite.com/page.php" >
<input type="text" size="7" name="o" id="origin" value="london" ></input>
<input type="submit" name="getDirectionsBtn" id="btnSubmit" value="Submit" />
<input type="hidden" name="oo" value="p" />
</form>
<form name="inner3" method="POST" action="http://www.somesite.com/page.php" >
<input type="text" size="7" name="o" id="origin" value="london" ></input>
<input type="submit" name="getDirectionsBtn" id="btnSubmit" value="Submit" />
<input type="hidden" name="oo" value="p" />
</form>
</form>
二+内在形式的工作得很好,但第一个不起任何作用。不碎的标签,据我可以看到。
Second+ inner form work just fine but first one does nothing. No broken tags as far as I can see.
我需要的嵌套形式,因为它们是POST到外部网站,并在空白窗口中打开。
I require nested forms as they are POST to an external site and open in a blank window.
推荐答案
HTML规范不允许嵌套形式。
The HTML specification does not allow nested forms.
您可能会发现,第一个内部形式的开始标记被忽略(取决于浏览器和标准模式),那么你的主&LT;形式&GT;
是正在通过第一内形式结束标记关闭,然后在随后的形式工作作为预期的
You might well find that the opening tag of the first inner form is being ignored (depending on browser and standards mode), then your main <form>
is being closed by the first inner forms closing tag, and then the subsequent forms are working "as expected".
这篇关于在服务器外形ASP.Net第一内部窗体不会POST的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文