我在a页面上用tipswindown插件,弹出一个iframe,在iframe上引用一个b页面,如何在这个b页面的Btn按钮点击时关闭这个弹出的iframe同时并将b页面上的一个参数回传给a页面并使a页面刷新呢?
解决方案 »
- EXTJS4表单的baseParams提交不了
- 如何把随机数当作变量
- 表格拖动排序 保存排序结果
- 鼠标提示框不跟随鼠标,同一个地方,但是上下拉一网页(业就是说该地点在屏幕位置变了),再把鼠标放上去,提示信息位置就不一样了。
- js中如何在一个函数中定义一个全局变量?
- 我的IE不支持getElementByTagName("xxxx")方法??
- 请教js的问题,马上揭贴
- 高手请进: 静态页面内 对表格 进行分页的问题
- 一个小问题,请看看....
- JavaScript问题,请教各位大侠。
- 使用Ext.Ajax.request({}) 查询后台时,有值时赋值,无值时,可以让用户自己输入???
- 滚动条问题
var readyState = ifm.readyState;
if(readyState=="complete")
{
ifm.getElementById("btn").onclick=function(){添加你的代码}
}
{
string Limit = getCheckBoxListSel(this.CheckBoxList1);
ClientScript.RegisterStartupScript(GetType(), "", "this.window.opener.document.all.TextBox1.value='" + Limit + "';window.opener.location.href=window.opener.location.href;window.close();", true);
}
如果传值并刷新的话会回到初始状态,也就是没传值之前
你直接赋值就可以
a页面js方法:
getValue(v){
document.getElementById(要赋值的元素).value = v;
}
弹出页面js方法:
setValue(){
var a = 要传递给a页面的值;
window.opener.getValue(a);
window.opener.location.href = window.opener.location;
window.close();
}<input type="button" onclick="setValue();"/>
$('iframe').load(function(){
$(this).contents().find("#btn").click(function(){
$('#addgg').hide(); //关闭,自己写代码
});/* 获取框架里面的某对象的值 */
$('iframe').contents().find('*****').val();
/*弹出消息层*/
$(function() {
$("#iframe1").click(function() {
tipsWindown("设置字段","iframe:Default2.aspx","600","400","true","","true","id");
//$("#ddlCom").hide();
allddl=document.all.tags("SELECT");
for(i=0;i<allddl.length;i++){
id=allddl[i].id;
document.getElementById(id).style.display='none';
}
//$("#ddlCom").show();
});
});因为这个弹出层的同时要隐藏下拉框!
B页面的Btn事件
protected void btnSubmit_Click(object sender, EventArgs e)
{
string Limit = "aaa";
ClientScript.RegisterStartupScript(GetType(), "", "this.window.opener.document.all.txtziduan.value='" + Limit + "';
window.opener.location.href=window.opener.location.href;window.close();", true);
}在返回A页面值的同时使下拉框显示并是弹出层隐藏。上面btn的方法不行!求正解!