ASP中如何提交iframe中的表单?

来源:百度知道 编辑:UC知道 时间:2024/05/15 01:35:06
ASP1文件中有一个表单FORM1,在这个FORM表单中用iframe包含另一个ASP2文件,ASP2中也有一个表单FORM2,现在要实现的功能是,在ASP1中点击提交后先处理ASP2中的表单FORM2的提交,如果数据验证正确并提交正确后,再处理FORM1中的数据.

有高手请指教啊!

这是2.html的内容:
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<script language="javascript">
<!--
function check()
{
if(document.form2.txt1.value=="")
{
alert("不能为空");
document.form2.txt1.focus();
}
else
{
parent.form1.txt1_1.value=document.form2.txt1.value;
}
}
//-->
</script>
</head>

<body>
<form name="form2">
<input type="text" name="txt1" />
<input type="button" value="kljl" onclick="check()"/>
</form>
</body>
</html>
这是1