showModalDialog('ttt.htm', window,'dialogWidth: 480px; dialogHeight: 360px; status: no; help: no');把 window 对象传到模态框里去window.dialogArguments.document.formName.inputName.value = "想赋什么值就传什么值"

解决方案 »

  1.   

    function buttonclick(obj)
        {
            var s
            try
            {
              s=window.showModalDialog("FFrame.aspx?url=STItemColShelfSelect.aspx?ID="+obj.parentElement.children(0).value+"&WhCode="+document.form1.TxtWhCode.value,document.form1.TxtWhCode.value,"dialogWidth=800px;dialogHeight=600px");
            }
            catch (e)
            {
              window.alert(e.message);
            }
            if (s==null)
             return false;
            obj.parentElement.children(0).value=s;
            return true;
        }
    //obj.parentElement.children(0).value為Cell中的TextBox控件,obj為cell中的button控件
    button的事件為:OnClientClick='javascript:return buttonclick(this)'