var  select = window.showModalDialog("select.jsp","MyDialog",strStyle); 
alert(select); //不能把SELECT对象返回, 你直接返回它的VALUE

解决方案 »

  1.   

    但是alert(select) 却实是个对象[object]
      

  2.   

    var  sel = window.showModalDialog("select.jsp","MyDialog",strStyle); 
    alert(sel);
      

  3.   

    你的 window.returnValue 是怎么写的??
    应该是: window.returnValue = document.formName.selectName.options[0].value;
    因为随着 showModalDialog 模态框的关闭, 里面的select对象也随着被销毁, 所以你返回 select 对象是没有意义的, 你应该直接返回你想返回的值.
      

  4.   


    window.returnValue = selectform.select;
    我要获得select.options里的所有值.
      

  5.   

    你可以把 select.options 里所有要回传的信息组合成一个数组回传.
      

  6.   

    如果直接用window.returnValue = selectform.select;
    返回的对象是一个select的空壳对象(<select name=select></select>),不带options