各位牛人初学,碰到一个问题,不能解决。
问题描述:需要在一个已经存在post表单的页面a.html上,取出其中的一些数据用get表单提交到b.hmtl。使用onunload,出现问题,不能到达b.html。只显示a.html?急盼解决,谢谢各位。<html >
<head>
<title></title>
<script language="javascript">
function go(){
if(ture)
document.form1.submit();
}
</script></head>
<body onunload="go()" ><form action="a.html" name="form1" method="get">
<input type="text" name="spcode" value="splt"></input>
</form>
<form action="b.html" name="form2" method="post">
<input type="text" name="spcode" value="splt"></input>
<input type="submit" name="11"></input>
</form>
</body>
</html>
问题描述:需要在一个已经存在post表单的页面a.html上,取出其中的一些数据用get表单提交到b.hmtl。使用onunload,出现问题,不能到达b.html。只显示a.html?急盼解决,谢谢各位。<html >
<head>
<title></title>
<script language="javascript">
function go(){
if(ture)
document.form1.submit();
}
</script></head>
<body onunload="go()" ><form action="a.html" name="form1" method="get">
<input type="text" name="spcode" value="splt"></input>
</form>
<form action="b.html" name="form2" method="post">
<input type="text" name="spcode" value="splt"></input>
<input type="submit" name="11"></input>
</form>
</body>
</html>
if(ture)
document.form1.submit();
} codeonload="go()" go函数里面执行form1.submit()当然不能到b.html了、
谢谢。但是我点击了form2的提交按钮啊。
这个该怎么解释呢
美女,codeonload,没有google到。
有一个网页上面有一个表单form2
<form action="b.html" name="form2" method="post">
<input type="text" name="spcode" value="splt"> </input>
<input type="submit" name="11"> </input>
</form>
现在的操作是表单提交到了b.html
现在我加了一个get请求表单form1。
<form action="a.html" name="form1" method="get">
<input type="text" name="spcode" value="splt"> </input>
</form>
并利用一些js,要求form1提交到a.html
但是实际执行过程是只能看到a.html?
不能看到b.html