一\ 用 showModalDialog 弹出一个窗口
比如 Form1 弹出 Form2
现在要在 Form2中操作 Form1中的控件
window.parent.document.all["txtReturn"].value="fly";为什么会提示 "window.parent.document.all.txtReturn 是null或不是对象
注: txtReturn 这个是一个 INPUT 框二\ 在客户端可不可以操作 Session, 如果可以, 应该怎么做
比如 Form1 弹出 Form2
现在要在 Form2中操作 Form1中的控件
window.parent.document.all["txtReturn"].value="fly";为什么会提示 "window.parent.document.all.txtReturn 是null或不是对象
注: txtReturn 这个是一个 INPUT 框二\ 在客户端可不可以操作 Session, 如果可以, 应该怎么做
解决方案 »
- 发布网站时候,AspNetPager不能加载出错,bin目录有AspNetPager.dll文件
- web service在后台提供了一种方法 远程怎样调用这种方法
- 弹出消息框(Asp.Net)
- 动态创建的textbox访问不到
- datatime 格式 20090907 怎么转?
- 网页中使用了ActiveX控件,如何才能提示用户进行安装
- 特殊的URLRewrite 可实施性参考
- 在treeview中,如何点击节点获得点击该节点的值。
- 在MS-SQL是查询重复记录如下写法为什么不对,而用OleDb就可以。
- 如何重复利用代码
- 使用C#的ASP.NET中的DATAGRID问题~
- asp.net中的datagrid参数问题!
opener.document.all.txtReturn
window.parent.form1.txtReturn.value="fly";
2.
A页面中的HTML部分:
<form id="postForm" method="post" runat="server">
<INPUT id="txt" type="text">
<asp:Button id="Button1" runat="server" Text="Button"></asp:Button>
</form>
(BUTTON为WEB控件,文本框为HTML控件)
_____________________________________________________________________________
在A页面的代码(CODEBEHIND)部分:
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Button1.Attributes.Add("onclick", "window.open('b.aspx');")
End Sub
————————————————————————————————————
在B页面的HTML部分:
<form method="post" runat="server" id="theset">
<SELECT id="lis" size="2">
<OPTION>abc</OPTION>
<OPTION>efg</OPTION>
</SELECT>
<INPUT type="button" onclick="JScript:parent.window.opener.postForm.txt.value=window.theset.lis.options[window.theset.lis.selectedIndex].text;"
value="Button">
</form>
——————————————————————————————————————
var strValue;
strValue = window.showModalDialog("Test.htm","1,2,3","dialogWidth:400px;dialogHeight:300px;center:1");
因为某些原因, 也不能用楼上说的 返回值的办法快来人啊另 : Session可以在 客户端使用吗