还是关于打开窗口传递参数的问题,很急的问题,整个程序就差这个了,谢谢了啊 还有一个怎么把B里面的表格中的一个数据传到A里面的TEXT里面呢?谢谢 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 在b窗口弹出的时候,在写open时加一个参数然后b在取得就行了啊!!就像b.aspx?参数名=a中的值,然后在b中取得这个值就行了!! dim str1,str2 as string a.htm:window.open('B.htm?a=" & str1 & "&b=" & str2 & "')b.htm :服务器text1.value = Request.QueryString("a")text2.value=Request.QueryString("b") 我想用showModalDialog,因为B里面的参数我也要返回到A中的,是相互传递数据。但是具体的代码我不会写 a.htmvar r = showModalDialog("b.htm", "传入值", "");alert(r);b.htmalert(window.dialogArguments);window.returnValue = "返回值"; a.htm<a href="b.htm?xx=aa">ok</a>b.htm<body onload="document.f.i.value=(window.location.href).split('=')[1]"><form name=f><input name=i></form>也可以在a.htm做变量,用opener.xx取到 a.htm<SCRIPT LANGUAGE="JavaScript">function ento(url,para){ var oWin=window.open(url,"b"); deal(para);}function deal(para){ try{ if(oWin.document.body.readyState=="complete"){ oWin.frm.txt.value=para; } } catch(e){ setTimeout("check()",10); } }</SCRIPT><a href="javascript:ento('b.htm')">XX</a>b.htm<form id=frm><input id=txt><form> <a href="javascript:ento('b.htm','在b.htm的文本框中要显示的值')">XX</a> window.showModalDialog('a.aspx?a=" & a & "&b=" & b & "','','DialogHeight:54px;DialogWidth:43px')b.htm :服务器text1.value = Request.QueryString("a")text2.value=Request.QueryString("b") showmodaldialog.htm:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><title>无标题文档</title></head><script language="JavaScript">function showdia(){var a;a=showModalDialog("dia.htm?a=hao",document.all.text1.value,"dialogwidth=200px;dialogheight=100px");text1.value=a}</script><body><input type="text" value="传入1" name="text1"><input type="button" value="传入值" name="btn" onClick="showdia();"></body></html>///////////////////dia.htm<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><title>无标题文档</title></head><script language="JavaScript">function button1_click(){window.returnValue=document.all.text1.value;window.close();}</script><body onLoad="javascript:document.all.text1.value=window.dialogArguments;" onUnload="javascript:button1_click();"><input type="text" name="text1" value=""><input type="button" value="guanbi" onClick="button1_click();"></body></html> 求助!jqGrid合并表头后 提交多次请求出现叠加情况 Ext checkbox取值问题 CuteEditor 中无法创建有事件的按钮[100分] 几道面试题! 求排序办法 怎样网页上用鼠标画圆? 大伙请看,这网页怎么会这样??? 求限制textArea最大字符数的函数?例如限制最多只能输入100个字符,输入可能是中文或英文,当输入了99个字符长度,则不能再输入一个汉字,只能 百度地图V2.0,手动拖拽驾车路线后怎么获得拖拽后路线的坐标??? 求助,关于OnBtnAdd事件无法触发 求用js前台判断表单所填值是否为数字类型!! 如何控制两个文本框,要么两个都填,要么两个都不填?
dim str1,str2 as string
a.htm:
window.open('B.htm?a=" & str1 & "&b=" & str2 & "')b.htm :服务器
text1.value = Request.QueryString("a")text2.value=Request.QueryString("b")
var r = showModalDialog("b.htm", "传入值", "");
alert(r);b.htm
alert(window.dialogArguments);
window.returnValue = "返回值";
<body onload="document.f.i.value=(window.location.href).split('=')[1]">
<form name=f>
<input name=i>
</form>也可以在a.htm做变量,用opener.xx取到
<SCRIPT LANGUAGE="JavaScript">
function ento(url,para)
{
var oWin=window.open(url,"b");
deal(para);
}
function deal(para)
{
try{
if(oWin.document.body.readyState=="complete"){
oWin.frm.txt.value=para;
}
}
catch(e){
setTimeout("check()",10);
}
}
</SCRIPT>
<a href="javascript:ento('b.htm')">XX</a>b.htm
<form id=frm>
<input id=txt>
<form>
text1.value = Request.QueryString("a")text2.value=Request.QueryString("b")
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>
<script language="JavaScript">
function showdia()
{
var a;
a=showModalDialog("dia.htm?a=hao",document.all.text1.value,"dialogwidth=200px;dialogheight=100px");
text1.value=a
}
</script>
<body>
<input type="text" value="传入1" name="text1">
<input type="button" value="传入值" name="btn" onClick="showdia();">
</body>
</html>
///////////////////
dia.htm
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>
<script language="JavaScript">
function button1_click()
{
window.returnValue=document.all.text1.value;
window.close();
}
</script>
<body onLoad="javascript:document.all.text1.value=window.dialogArguments;" onUnload="javascript:button1_click();">
<input type="text" name="text1" value="">
<input type="button" value="guanbi" onClick="button1_click();">
</body>
</html>