javascript中怎样将模式窗口中的值返回,又是怎样获得返回值呢?

解决方案 »

  1.   

     function showModal()
            {
                /*接收模式窗口传值*/            
                var str = window.showModalDialog("questionBank.aspx?", "", "dialogWidth:770px;dialogHeight:400px;status:no");            if (typeof (str) != "undefined")
                {                /*处理程序*/            }
            }  /*模式窗口返回值str*/            
      function setValue(str) {
                window.returnValue = str;
                window.opener = null;
                window.close();
            }