如何将URL作为参数传递给javascript函数

如何将URL作为参数传递给javascript函数

问题描述:

当我点击按钮时我实现了javascript和一个按钮我希望将UR作为参数传递给该函数



我尝试了什么:



I implemented javascript and one button when I click the button I want to pass UR as parameter to that function

What I have tried:

function <pre><pre lang="text"><script type="text/javascript">
        function LoadHGGames(param) {
            var url = param;
            window.open(url, 'winPop', '_blank,height=650,width=1000,left=0,top=0,resizable=yes,location=yes,status=no');
            window.focus();
            return false;
        }
    </script>







<asp:Button runat="server" Text="submit" OnClientClick="javascipt:LoadHGGames(https://v3livehguat.hointeractive.com/visitor/login/V3login.jsp?detectflash=false&lang=en&refreshfly=true)" />

此代码无效

在网址中添加引号



add quotes to the url

<asp:Button runat="server" Text="submit" OnClientClick="javascipt:LoadHGGames('https://v3livehguat.hointeractive.com/visitor/login/V3login.jsp?detectflash=false&lang=en&refreshfly=true')" />