亚洲免费乱码视频,日韩 欧美 国产 动漫 一区,97在线观看免费视频播国产,中文字幕亚洲图片

      1. <legend id="ppnor"></legend>

      2. 
        
        <sup id="ppnor"><input id="ppnor"></input></sup>
        <s id="ppnor"></s>

        ASP獲取客戶端屏幕分辨率、ASP獲得用戶分辨率

        字號(hào):


            實(shí)現(xiàn)方法:
            在訪問網(wǎng)頁的時(shí)候使用js獲得瀏覽器的分辨率然后轉(zhuǎn)向本網(wǎng)頁并把分辨率傳出去,然后接收分辨率并把它存儲(chǔ)在session中,最后再轉(zhuǎn)到之前的網(wǎng)頁
            代碼:
            <%
            '若已經(jīng)自動(dòng)轉(zhuǎn)向執(zhí)行此條件語句
            if Bint(trim(request("sw"))) > 0 then
               session("MyScreenWidth")=Bint(trim(request("sw")))
               session("MyScreenHeight") = Bint(trim(request("sh")))
               response.Redirect(session("FrontUrl"))
            end if
            %>
            <%
            '第一次訪問網(wǎng)頁
            if Bint(session("MyScreenWidth"))=0 then
            if Bint(trim(request("sw"))) = 0 then
               session("FrontUrl") = GetUrl()
            end if
            response.Write("<scr"&"ipt>")
            if Instr(GetUrl(),"?") > 0 then
               response.Write("window.location='"&GetUrl()&"&sw='+screen.width+'&sh='+screen.height;")
            else
               response.Write("window.location='"&GetUrl()&"?sw='+screen.width+'&sh='+screen.height;")
            end if
            response.Write("</scr"&"ipt>")
            end if
            %>
            <%="你的分辨率是:"&session("MyScreenWidth")&"*"&session("MyScreenHeight")%>
            <%
            '下面是幾個(gè)函數(shù)
            Function Bint(str)
            If IsNumeric(str) then
               Bint = Clng(str)
            Elseif IsEmpty(str) then
               Bint = 0
            Elseif IsNull(str) then
               Bint = 0
            Else
               Bint = 0
            End if
            End function
            Function GetUrl()
            sUrl = Request.ServerVariables("URL")
            sQueryString = ""
            For Each x In Request.QueryString
            sQueryString = sQueryString & "&" & x & "=" & Server.URLEncode(Request(x))
            Next
            if len(sQueryString)>0 then
            sQueryString = right(sQueryString,len(sQueryString)-1)
            else
            sQueryString = ""
            end if
            if len(sQueryString)>0 then
            GetUrl = sUrl & "?" & sQueryString
            else
            GetUrl = sUrl
            end if
            End function
            %>