window.showModalDialog("XXX.jsp",window);可返回XXX.jsp中某个变量的值

解决方案 »

  1.   

    不知道楼主是什么意思!实在不行可以用XMLHTTP方法获得其内容!楼主看一下我以前做的一个东西(即时更新世界杯信息到本人的网站):<script language=vbscript>
    Function URLEncoding(vstrIn)
        strReturn = ""
        For i = 1 To Len(vstrIn)
            ThisChr = Mid(vStrIn,i,1)
            If Abs(Asc(ThisChr)) < &HFF Then
                strReturn = strReturn & ThisChr
            Else
                innerCode = Asc(ThisChr)
                If innerCode < 0 Then
                    innerCode = innerCode + &H10000
                End If
                Hight8 = (innerCode  And &HFF00)\ &HFF
                Low8 = innerCode And &HFF
                strReturn = strReturn & "%" & Hex(Hight8) &  "%" & Hex(Low8)
            End If
        Next
        URLEncoding = strReturn
    End FunctionFunction bytes2BSTR(vIn)
        strReturn = ""
        For i = 1 To LenB(vIn)
            ThisCharCode = AscB(MidB(vIn,i,1))
            If ThisCharCode < &H80 Then
                strReturn = strReturn & Chr(ThisCharCode)
            Else
                NextCharCode = AscB(MidB(vIn,i+1,1))
                strReturn = strReturn & Chr(CLng(ThisCharCode) * &H100 + CInt(NextCharCode))
                i = i + 1
            End If
        Next
        bytes2BSTR = strReturn
    End Function
    </script><script language=javascript>
     xh = new ActiveXObject("Microsoft.XMLHTTP");
     xh.open("GET","http://fifaworldcup.yahoo.com/06/cn/w/group/index.html",false);
     xh.send();
     document.write(bytes2BSTR(xh.responseBody));
    </script>bytes2BSTR(xh.responseBody)字符串就是该网页的代码。