home.html<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head><body>
<iframe frameborder="1" id="FrmRight" name="right" scrolling="auto" src="Call.html"></iframe>
</body>
</html>Call.html<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<script type="text/javascript">
var temp="";
function btnClick()
{
var str=document.getElementById("col").value;
if(str=="")
{
alert("请输入");
document.getElementById("col").focus();
return;
}
temp=str;
window.open("Caller.html","_self");
}
</script>
</head><body>
请输入颜色
<input type="text" id="col" />
<input type="button" id="C" value="Call" onclick="btnClick()" />
</body>
</html>Caller.html<body>
<input type="text" id="co" />
<input type="button" id="a" value="Caller" />
</body>
</html>
<script type="text/javascript">
alert(window.opener.location);
</script>

解决方案 »

  1.   

    我想在Caller.html页面中获得Call.html页面的URL————Call.html
      

  2.   

    是要Caller.html代替之前的Call.html的位置,在<iframe>
      

  3.   

    笨办法 call.html里面 <script type="text/javascript"> 
    var temp=""; 
    function btnClick() {
     var str=document.getElementById("col").value; 
    if(str=="") { 
    alert("请输入"); 
    document.getElementById("col").focus(); 
    return; 

    temp=str; 
    window.open("Caller.html?"+document.location.href,"_self"); } 
    </script>caller.html里面<script type="text/javascript">
    var str = window.location.href.split("?")  
        alert(str[1]);
    </script>
      

  4.   


    var DllPath = top.g_sBinSign;
    var Tab_DBName = oTab.sName;
    var strModal = new Array(Tab_DBName,DllPath);
    var strReturn = window.showModalDialog("AddDataBase.htm",strModal,"font-size:12px;dialogWidth:28em;dialogHeight:32em;center:yes;help:no;status:no;scroll:no");
    var strModal = window.dialogArguments;为什么window.open()不能像window.showModalDialog()这样,可以直接把参数传到下一页呢?
      

  5.   

    我记得以前初学JS的时候写过一个对话框的JS不过不在这台电脑上
    直接调用那个方法就可以简单的传值 打开新窗口 规定大小 内容颜色等等
      

  6.   

    window.showModalDialog("AddDataBase.htm",strModal,"font-size:12px;dialogWidth:28em;dialogHeight:32em;center:yes;help:no;status:no;scroll:no");
      

  7.   

    window.open要传参我只知道写在url里
      

  8.   

    window.open()传参数只能加在查询字符串里,到下一页面进行解析
    还有一种方法就是,在框架页定义一个变量,在call.htm页面赋值,在caller.htm页面读取,这种方法我还没试过,大家可以试试看!