富贵资源网 Design By www.hznty.com
例子:
以下是父页的Html代码
<%@ Page Language="vb" AutoEventWireup="false" Codebehind="main.aspx.vb" Inherits="zero.main"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>main</title>
<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" content="Visual Basic .NET 7.1">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
<script language="javascript" charset="gb2312">
function searchvalue()
{
var sql="select * from companyjob";
SetCookie("SendSql",sql);
var url="child.aspx";
window.open(url,'_blank');
}
function SetCookie(name, value)
{
document.cookie = name + "=" + value;
}
</script>
</HEAD>
<body MS_POSITIONING="GridLayout" >
<form id="Form1" method="post" runat="server">
<INPUT id="Hidden1" style="Z-INDEX: 101; LEFT: 8px; POSITION: absolute; TOP: 8px" type="hidden"
name="Hidden1" runat="server"><INPUT style="Z-INDEX: 102; LEFT: 96px; POSITION: absolute; TOP: 144px" type="button" onclick="searchvalue();"
value="Open" id="Button1" name="Button1">
<asp:Button id="Button2" style="Z-INDEX: 103; LEFT: 256px; POSITION: absolute; TOP: 152px" runat="server"
Text="Button"></asp:Button>
</form>
</body>
</HTML>
child 页[子页]
<%@ Page Language="vb" AutoEventWireup="false" Codebehind="child.aspx.vb" Inherits="zero.child"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>child</title>
<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" content="Visual Basic .NET 7.1">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
<script language =javascript >
function getv()
{
alert(document.forms("Hidden1"));
document.all("Hidden1").value=document.forms("Hidden1");
}
</script>
</HEAD>
<body MS_POSITIONING="GridLayout" >
<form id="Form1" method="post" runat="server">
<INPUT style="Z-INDEX: 101; LEFT: 8px; POSITION: absolute; TOP: 8px" type="hidden" id="Hidden1"
name="Hidden1" runat="server"></FONT>
</form>
</body>
</HTML>
.vb文件
If Not IsPostBack Then
'Response.Write(Request.Form("Hidden1"))
Dim cookie As HttpCookie = Request.Cookies("SendSql")
If Not cookie Is Nothing Then
Response.Write(cookie.Value)
End If
End If
2。是思归大哥介绍的方法
在父页中加入一个非runat=server的form表单,用来提交隐藏控件的值到子页
<form method="post" target="_blank" id="form2">
<input type=hidden name="query">
</form>
<script language="javascript">
function searchvalue()
{
var sql="select * from companyjob";
document.all.form2.query.value=sql;
document.all.form2.action="child.aspx";
document.all.form2.submit();
}
</script>
子页的后台代码中 (.vb)
在Page_Load事件中写
Response.Write(Request.Form("query"))
以下是父页的Html代码
<%@ Page Language="vb" AutoEventWireup="false" Codebehind="main.aspx.vb" Inherits="zero.main"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>main</title>
<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" content="Visual Basic .NET 7.1">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
<script language="javascript" charset="gb2312">
function searchvalue()
{
var sql="select * from companyjob";
SetCookie("SendSql",sql);
var url="child.aspx";
window.open(url,'_blank');
}
function SetCookie(name, value)
{
document.cookie = name + "=" + value;
}
</script>
</HEAD>
<body MS_POSITIONING="GridLayout" >
<form id="Form1" method="post" runat="server">
<INPUT id="Hidden1" style="Z-INDEX: 101; LEFT: 8px; POSITION: absolute; TOP: 8px" type="hidden"
name="Hidden1" runat="server"><INPUT style="Z-INDEX: 102; LEFT: 96px; POSITION: absolute; TOP: 144px" type="button" onclick="searchvalue();"
value="Open" id="Button1" name="Button1">
<asp:Button id="Button2" style="Z-INDEX: 103; LEFT: 256px; POSITION: absolute; TOP: 152px" runat="server"
Text="Button"></asp:Button>
</form>
</body>
</HTML>
child 页[子页]
<%@ Page Language="vb" AutoEventWireup="false" Codebehind="child.aspx.vb" Inherits="zero.child"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>child</title>
<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" content="Visual Basic .NET 7.1">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
<script language =javascript >
function getv()
{
alert(document.forms("Hidden1"));
document.all("Hidden1").value=document.forms("Hidden1");
}
</script>
</HEAD>
<body MS_POSITIONING="GridLayout" >
<form id="Form1" method="post" runat="server">
<INPUT style="Z-INDEX: 101; LEFT: 8px; POSITION: absolute; TOP: 8px" type="hidden" id="Hidden1"
name="Hidden1" runat="server"></FONT>
</form>
</body>
</HTML>
.vb文件
If Not IsPostBack Then
'Response.Write(Request.Form("Hidden1"))
Dim cookie As HttpCookie = Request.Cookies("SendSql")
If Not cookie Is Nothing Then
Response.Write(cookie.Value)
End If
End If
2。是思归大哥介绍的方法
在父页中加入一个非runat=server的form表单,用来提交隐藏控件的值到子页
<form method="post" target="_blank" id="form2">
<input type=hidden name="query">
</form>
<script language="javascript">
function searchvalue()
{
var sql="select * from companyjob";
document.all.form2.query.value=sql;
document.all.form2.action="child.aspx";
document.all.form2.submit();
}
</script>
子页的后台代码中 (.vb)
在Page_Load事件中写
Response.Write(Request.Form("query"))
富贵资源网 Design By www.hznty.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
富贵资源网 Design By www.hznty.com
暂无评论...
稳了!魔兽国服回归的3条重磅消息!官宣时间再确认!
昨天有一位朋友在大神群里分享,自己亚服账号被封号之后居然弹出了国服的封号信息对话框。
这里面让他访问的是一个国服的战网网址,com.cn和后面的zh都非常明白地表明这就是国服战网。
而他在复制这个网址并且进行登录之后,确实是网易的网址,也就是我们熟悉的停服之后国服发布的暴雪游戏产品运营到期开放退款的说明。这是一件比较奇怪的事情,因为以前都没有出现这样的情况,现在突然提示跳转到国服战网的网址,是不是说明了简体中文客户端已经开始进行更新了呢?