RTThanks//
解决方案 »
- try catch 有异常 不显示catch 内容 看内容
- ASP.NET的数据控件
- 如何获得panel中动态生成label的值,在线等,急,谢谢!!
- 小弟有个问题,大家帮帮忙啊,急,关于如果把DataSet中的列添加到一个DataTable中
- access中 insert一条新的纪录 备注型字段出现问题 标准表达式中数据类型不匹配
- 那开发一个大型项目,不知道是采用存储过程还是直接写在代码里面??请大家帮忙想一下啊
- 关于查询子符串
- 菜鸟求助!!!datagrid 怎样让每列最顶的标题行不显示???
- 高分问一个很原理的 ASP.NET问题~
- 我的主要工作是ASP,最近想装Win2K,请问大家是以我的情况是装Professional呢还是装Server?
- 表格自由拖动
- 如何在treeview的节点后面 添加图标?按钮?
window.opener.document.getElementById("button1").Clcick();
可以详细点吗....在A页面怎么接收textbo1的值.?
不就行了
function OpenWin()
{
window.open("b.htm");
}
function checkForm()
{
alert("点了A页面的button");
return true;
}
</script>
<form name="form1" onsubmit="return checkForm();">
<input type="button" value="打开新页面" onclick="OpenWin();">
<input type="text" value="" id="tb" name="tb">
<input type="submit" value="要执行的BUTTON" id="btn" name="btn"></form>b.htm:<script>
function TranValue()
{
window.opener.document.getElementById("tb").value=document.getElementById("tb1").value;
window.opener.document.getElementById("btn").click();
window.close();
}
</script>
<input type="button" value="传值回A页面并执行A的CLICK事件" onclick="TranValue();">
<input type="text" value="123123123123" id="tb1" name="tb1">
var url = "a.aspx?Id=" + id;
var mwidth = "400";
var mheight = "330";
var loc_x, loc_y;
loc_x = parseInt((document.body.clientWidth - mwidth) / 2) + 200;
loc_y = parseInt((document.body.clientHeight - mheight) / 2);
window.open(url, "", "left=" + loc_x + "px,top=" + loc_y + "px,width=" + mwidth + "px,height=" + mheight + "px,resizable=no,scrollbars=yes,status=0");
function A()
{
_dopostback('','');
}
b.aspx
window.opener.document.getElementById("").value="";
window.opener.A();
window.opener.document.getElementById("button1").clcick();window.opener指的是打开本页面的页面,也就是你的A页面
window.opener.document.getElementById("textbox1")获取A页面ID为textbox1的文本框
window.opener.document.getElementById("textbox1").value=""; 将A页面文本框的值设置为空,你可以设置成你要想的值
window.opener.document.getElementById("button1")获取A页面ID为button1的按钮
window.opener.document.getElementById("button1").clcick();触发A页面的按钮的单击事件
父窗口:
<script language="javascript" type="text/javascript">
// <!CDATA[
window.open("_TimeSpan.aspx");
var v;
function Button1_onclick() {
alert(v);
}// ]]>
</script>子窗口:
<input id="Text1" type="text" value="123" onfocus="Do()" />
function Do() {
if (window.opener != null) {
window.opener.v = document.getElementById("Text1").value;
window.opener.document.getElementById("Button1").click();
}
}