Javascript打开新窗口,需要停止加载

Javascript open new window, need to stop from loading in same

本文关键字:加载 窗口 新窗口 Javascript      更新时间:2023-09-26

好的,所以我正在一个有游戏页面和宾果游戏室页面的宾果游戏网站上工作。 我需要玩家能够在玩宾果游戏的同时玩赌场游戏。

发生的事情是一切都加载在同一窗口中。

例如,目前我在 onclick 事件上如下所示......

<a href="javascript:void(0);" onclick="Player.LaunchBingoRoom('169')">

我有的LaunchBingoRoom:

LaunchBingoRoom: function (roomId) {
        if (!Player.IsLoggedIn()) {
            window.location.href = 'loginpage.html?login2play';
            return;
        }
        var roomFound = false;
        ko.utils.arrayForEach(Player.BingoRooms(), function (roomInstance) {
            var bingoRoomId = roomInstance.RoomId();
            if (bingoRoomId.toLowerCase() == roomId.toLowerCase()) {
                roomFound = true;
                Game.OpenBingoRoomWindow(roomId, 100, 100);
                return;
            }
        });

我将如何放入 open.window?

任何帮助将不胜感激。

谢谢

来了,对不起。

 OpenBingoRoomWindow: function (roomId, left, top) {
        var session = Game.SessionDetails();
        if (session == undefined) {
            return false;
        }
        window.open(((document.location.protocol == 'https:') ? 'https://' : 'http://') + this.BaseUrl + '/launch/bingo/' + roomId + '/' + session.UserId + '/' + session.SessionId + '/' + session.JSessionId + '/' + session.Language, "BingoRoom", "width=800,height=600,left=" + left + ",top=" + top + ",toolbar=0,status=0,location=no,");
        return true;
    },

在新窗口中打开顶部,使用window.open(),更改:

window.location.href = 'loginpage.html?login2play';

window.open('loginpage.html?login2play');