window.opener.document.getElementById('Textcity').value='value';注:
是不是下面这个有问题?
obj=document.getElementById("lstitem"); 
tt= obj.options[obj.selectedIndex].value;

解决方案 »

  1.   

    function btnok_onclick() {
    var tt;
    obj=document.getElementById("lstitem"); 
    tt= obj.options[obj.selectedIndex].value;
    window.opener.document.getElementById("Textcity").value=tt;
    window.close;
    }注意 只有window.open()才能用opener获取父页面
    如果是showModalDialog()
    就只能用返回值
      

  2.   

    window.close也有问题
    应该是window.close();
      

  3.   

    obj=document.getElementById("lstitem"); 
    tt= obj.options[obj.selectedIndex].value; 
    不是这个的问题,alert测试这个值tt是正确的..window.opener.document.getElementById('Textcity').value='value'; 
    用上面这句提示documnet对象为空.
      

  4.   

    你用的是open还是showModalDialog嘛?