0

我正在尝试使用 jQuery 从一个单独的站点基本上启动一个游戏。

http://webstudios.webs.com/rbxlaunch.htm

我的来源是

<html>
    <head>
        <title>ROBLOX Games!</title>
        <iframe width="100%" height="100%" id="Frame" seamless src="" scrolling=no style="position: absolute; top: 200px; left: 0px;"></iframe>
        <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
        <script>
            function VisitPlace(ID) {
                alert("Clicked.");
                $('#test').trigger('click');
                document.getElementById("Frame").src = "http://www.roblox.com/--place?id=" + ID;
                $("#Frame").load(function(){
                    alert("Done loading.");
                    $('#Frame').contents().find("#ctl00_cphRoblox_VisitButtons_MultiplayerVisitButton").trigger('click')
                                        alert("Enjoy the game");
                });
            }
        </script>
    </head>
    <body>
        <center>
            <button onclick="javascript:VisitPlace(487316);">ROBLOX remote visit test.</button>
            <button id="test" onclick="javascript:alert('Hello');">Ignore me.</button>
        </center>
</body>
</html>

我猜它由于跨域而无法正常工作。有哪些变通方法?

4

1 回答 1

0

没有人为干预、服务器端操作或目标站点的合作,据我所知,您无能为力。

于 2013-03-02T22:26:46.640 回答