父窗口的方法
function sele()
{
var url = "ping_test.do?method=select";
var returnValue = window.showModalDialog(url,"openwin","scroll:1;status:0;help:0;resizable:0;dialogWidth:800px;dialogHeight:600px");
document.forms[0].vouch.value = returnValue;
}returnValue 的值拿不到子窗口window.returnValue的值没传过来。。
子窗口方法
function returnValue()
{
var strRadios = document.getElementsByName("radioValue"); 
var value22 = "";
if("" == strRadios || null == strRadios)
{
toClose();
}
else
{
for( var i = 0 ; i<strRadios.length ; i++ )
{
if( strRadios[i].checked )
{
value22 = strRadios[i].value;
}
}
}
alert(value22);
window.returnValue = value22;
window.close();
  }

解决方案 »

  1.   

    alert(value22);
    显示数据了吗?
      

  2.   

    先简化一下代码,看看能传过来不
    function returnValue()
    {
        window.returnValue = 123;
        window.close();
    }
      

  3.   

    另外最好不要用returnValue作为函数名
      

  4.   

    function returnValue()
    |
    |
    function returnValuess()
      

  5.   

    alert(value22);
    显示数据了吗显示数据了``就是传不过去``
      

  6.   

    额犯了低级错误function returnValue()
    |
    |
    function returnValuess()函数名写错了下次注意了`