页面之间如何传递变量? 我想在弹出页面中选择日期或者其它参数,并返回给父页面。我希望返回的就是保存在lable的tooltip中,我已经通过脚本成功修改了lable的tooltip的值,但在按钮事件中总是取不到修改后的值,有啥好办法吗? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 这是孟老大的: 可以通过window.returnValue向打开对话框的窗口返回信息,当然也可以是对象。例如: test4.htm =================== <script> var a = window.showModalDialog("test5.htm") for(i=0;i<a.length;i++) alert(a[i]) </script> test5.htm =================== <script> function sendTo() { var a=new Array("a","b") window.returnValue = a window.close() } </script> <body> <form> <input value="返回" type=button onclick="sendTo()"> </form> function returnparent(id,str,value){ window.opener.document.getElementById(id).innerText=str; window.opener.document.all.LabREDate.title = value; self.close(); }这是我用的返回变量的脚本,在服务器事件中调用。看来返回变量只能通过脚本来实现了,没有其它更好的办法了。 如何在一个aspx页面局部添加一个html? 图片和视频怎么加入Access数据库? 在线等~新手入门求开发例子 仿GOOGLE查询效果 请教点关于存储过程的问题。。请大虾指教下。。。 页面上回车提交的问题 获取FormsAuthenticationTicket 里UserData数据的问题 如何在模式窗口中点链接不会打开新窗口 datalist分页问题---footer中分页的数字不见了??? 倾家荡产的提问!如何把图片放进dropdownlist里? |M| 关于数据绑定时RowDataBound问题 请大家帮忙看一下
可以通过window.returnValue向打开对话框的窗口返回信息,当然也可以是对象。例如: test4.htm
===================
<script>
var a = window.showModalDialog("test5.htm")
for(i=0;i<a.length;i++) alert(a[i])
</script> test5.htm
===================
<script>
function sendTo()
{
var a=new Array("a","b")
window.returnValue = a
window.close()
}
</script>
<body>
<form>
<input value="返回" type=button onclick="sendTo()">
</form>
window.opener.document.getElementById(id).innerText=str; window.opener.document.all.LabREDate.title = value;
self.close();
}这是我用的返回变量的脚本,在服务器事件中调用。
看来返回变量只能通过脚本来实现了,没有其它更好的办法了。