日期:2014-05-17  浏览次数:20548 次

请问通过这样的方式为什么不能将数据分别提交至两个页面?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<script language="javascript">
function doSubmit(){
document.form2.submit();
}
</script>
</head>
<body>
<form action="one.php" method="post" name="form1" onsubmit="doSubmit();">
<input type="hidden" name="foo" value="nicole" />
<input type="hidden" name="bar" value="123456" />
<input type="submit" />
</form>
<form action="two.php" method="post" name="form2">
<input type="hidden" name="tom" value="tome" />
<input type="hidden" name="jerry" value="jerry" />
</form>
</body>
</html>

------解决方案--------------------
只能提交一个


要发送数据 可以尝试Ajax
------解决方案--------------------
iframe