我正在使用ASP.NET MVC創建一個頁面,張貼到貝寶沙箱。發佈到Paypal網站的表單嵌套在父表單中。我使用的是Internet Explorer 7,出於某種原因,嵌套表單發佈到我的本地機器而不是貝寶網站。如果我在第一個後面添加同一個嵌套表單的副本,第一個發佈到localhost,第二個發佈到預期的位置。Internet Explorer嵌套表格帖子
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>
</title>
</head>
<body>
<form name="aspnetForm" method="post" action="" id="aspnetForm">
<!--First form posts locally-->
<form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post">
<input type="submit" value="Pay"/>
</form>
<!--Second identical form posts to the expected destination-->
<form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post">
<input type="submit" value="Pay"/>
</form>
</form>
您不允許在HTML中嵌套表單。嘗試這樣做只會導致痛苦,因爲瀏覽器試圖從錯誤中恢復。所以不要嘗試。 – Quentin 2010-06-23 13:42:57