<head id="Head1" >
<title> </title>
</head>
<body >
<form id="form1" name='form1' action="B.aspx?wd=abc">
</form>
</body>
</html><script type="text/javascript">
document.form1.submit();
</script> 我采用这种方法跳转到B页面,但是在B页面接收不到传过来的参数.由于设计方式是通过一个页面根据传递不同参数从而显示不同内容所以这里就需要传递一个参数,但是又不想这个参数出现IE的url地址框,所以采用这种方式跳转,为了达到自动跳转我写了个
document.form1.submit();
但是跳转后无法显示传递的内容
<form id="form1" name='form1' action="B.aspx" method="post">
<input id="wd" name="wd" value="abc" type="hidden" />
</form>
<script type="text/javascript">
document.forms["form1"].submit();
</script>
</body>//B.aspx
protected void Page_Load(object sender, EventArgs e)
{
if (Request.Form["wd"] != null)
Response.Write(Request.Form["wd"]);
}
后台取值用Request.Form[""] 这样