showmodaldialog的问题,c#代码 try:window.parent.returnValue=document.Form2.TextBox1.value; 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 opener.returnValue=document.Form2.TextBox1.Text ;opener.close(); <body MS_POSITIONING="GridLayout"> <script language="javascript">function a(){ window.parent.returnValue=document.Form2.TextBox1.Text ; window.parent.close();} </script> <form id="Form2" method="post" runat="server"> <asp:label id="Label1" runat="server">请输入您的大名:</asp:label><br> <br> <asp:textbox id="TextBox1" runat="server" Width="558"></asp:textbox><br> <br> <input type=button onclick="a()" value=" 提 交 "></form> </body> 可参考http://xml.sz.luohuedu.net/xml/ShowDetail.asp?id=49ML4AO8-5PB3-4KNY-NJZD-LJOIOXV4M1X4 net_lover(孟子E章) 你给的代码跟我的一样啊。我这是在aspx文件里写的javascript他说TextBox不存在 net_lover(孟子E章) 我是根据你哪个该成c#代码的。你用的是在aspx.vb的page_load注册客户段代码,但是我不知道C#怎么写,我就他他直接潜入到aspx里。 这个是调用弹出菜但哪个窗体<%@ Page language="c#" Codebehind="WebForm1.aspx.cs" AutoEventWireup="false" Inherits="showModalDialog.WebForm1" %><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" ><HTML> <HEAD> <title>WebForm1</title> </HEAD> <BODY> <script language="javascript"> function OpenWin() { var str=window.showModalDialog('WebForm2.aspx',window.Form1.TextBox1.Value); if(str!=undefined) { document.Form1.TextBox.value=str; } } </script> <meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1"> <meta name="CODE_LANGUAGE" Content="C#"> <meta name="vs_defaultClientScript" content="JavaScript"> <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5"> <form id="Form1" method="post" runat="server"> <asp:label id="Label1" runat="server" Font-Bold="true">从当前页面打开新窗口,并把变量传递到新窗口的例子,可以多次打开提交。</asp:label><br> <br> <asp:textbox id="TextBox1" runat="server" Width="600px">这是初始值,将被传递到新窗口。</asp:textbox><br> <br> <asp:button id="Button1" runat="server" Text="打开窗口" Width="96px"></asp:button> </form> </BODY></HTML> .net c#中如何实现与Jscript完全一样的eval函数解析执行? 请教一个代码风格的问题:操作符放在句首的优点 【散分】公布一些常用的WebServices,希望对大家的应用有帮助~ SvnHost经营困难,有人收购吗? 怎么样添加Textbox失去焦点时触发的事件 在线等!正则表达式匹配的问题 用户控件出错 56kc论坛的数据库还原不了?急!在线等 关于一个页面填充的问题 !!!!!!!!!!我想要隐藏地址中的参数信息应该怎么做呢 发布:DataGrid加强版 如何保存登录信息?
opener.close();
<script language="javascript">
function a()
{
window.parent.returnValue=document.Form2.TextBox1.Text ;
window.parent.close();
}
</script>
<form id="Form2" method="post" runat="server">
<asp:label id="Label1" runat="server">请输入您的大名:</asp:label><br>
<br>
<asp:textbox id="TextBox1" runat="server" Width="558"></asp:textbox><br>
<br>
<input type=button onclick="a()" value=" 提 交 "></form>
</body>
http://xml.sz.luohuedu.net/xml/ShowDetail.asp?id=49ML4AO8-5PB3-4KNY-NJZD-LJOIOXV4M1X4
你给的代码跟我的一样啊。我这是在aspx文件里写的javascript他说TextBox不存在
我是根据你哪个该成c#代码的。你用的是在aspx.vb的page_load注册客户段代码,但是我不知道
C#怎么写,我就他他直接潜入到aspx里。
<%@ Page language="c#" Codebehind="WebForm1.aspx.cs" AutoEventWireup="false" Inherits="showModalDialog.WebForm1" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title>WebForm1</title>
</HEAD>
<BODY>
<script language="javascript">
function OpenWin()
{
var str=window.showModalDialog('WebForm2.aspx',window.Form1.TextBox1.Value);
if(str!=undefined)
{ document.Form1.TextBox.value=str;
}
}
</script>
<meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" Content="C#">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
<form id="Form1" method="post" runat="server">
<asp:label id="Label1" runat="server" Font-Bold="true">
从当前页面打开新窗口,并把变量传递到新窗口的例子,可以多次打开提交。
</asp:label><br>
<br>
<asp:textbox id="TextBox1" runat="server" Width="600px">这是初始值,将被传递到新窗口。</asp:textbox><br>
<br>
<asp:button id="Button1" runat="server" Text="打开窗口" Width="96px"></asp:button>
</form>
</BODY>
</HTML>