如何转发参数

时间:2013-05-20 16:47:52

标签: javascript html

如何转发我的wh参数?

<html>
    <body>
        <p id="demo">Please maximize your browser then click OK.</p>
        <button onclick="myFunction()">OK</button>
        <script>
            function myFunction()
            {
                var w=window.innerWidth;
                var h=window.innerHeight;
                x=document.getElementById("demo");
                x.innerHTML="Width: " + w + " Heigth: " + h;
            }
        </script>
        <meta HTTP-EQUIV="REFRESH" content="0; url=http://80.169.28.12:3333/webRDP/start?v=192.168.1.13&u=domain%5C&pf=263&w="***!!w!!***"&h="***!!h!!***"">
    </body>
</html>

1 个答案:

答案 0 :(得分:4)

如果您想要重定向点击,请移除<meta/>标记,然后将以下内容添加到您的功能结尾:

window.location.href = 'http://80.169.28.12:3333/webRDP/start?v=192.168.1.13&u=domain%5C&pf=263&w='+ w + '&h='+ h;