From 588e9b1d1c06fd92adcd6ac2daede6a03bf414b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9E=AB=E8=B0=B7=E5=89=91=E4=BB=99?= Date: Thu, 9 Apr 2020 13:37:48 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8C=89=E4=BD=8FCtrl=E5=8F=AF=E4=BB=A5?= =?UTF-8?q?=E5=9C=A8=E6=96=B0=E7=AA=97=E5=8F=A3=E4=B8=AD=E6=89=93=E5=BC=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- multi.html | 4 ++-- script.js | 12 ++++++++++-- solo.html | 4 ++-- triple.html | 4 ++-- 4 files changed, 16 insertions(+), 8 deletions(-) diff --git a/multi.html b/multi.html index 9f873b17..754f63ff 100644 --- a/multi.html +++ b/multi.html @@ -38,8 +38,8 @@ var formation = new Formation(teamsCount,5); - - + + diff --git a/script.js b/script.js index 234c2420..c90ae872 100644 --- a/script.js +++ b/script.js @@ -219,8 +219,9 @@ function swapABCteam() } } //在单人和多人之间转移数据 -function turnPage(toPage) +function turnPage(toPage,e = null) { + console.log(e) let pagename = null; switch(toPage) { @@ -269,7 +270,14 @@ function turnPage(toPage) pagename = "triple.html"; break; } - location.href = creatNewUrl({url:pagename, notPushState:true}); + const newURL = creatNewUrl({url:pagename, notPushState:true}); + if (e && e.ctrlKey) + { + window.open(newURL); + }else + { + location.href = newURL; + } } window.onload = function() { diff --git a/solo.html b/solo.html index 7355862a..fbc8446c 100644 --- a/solo.html +++ b/solo.html @@ -38,8 +38,8 @@ var formation = new Formation(teamsCount,6); - - + +
diff --git a/triple.html b/triple.html index f6375071..a381e2dd 100644 --- a/triple.html +++ b/triple.html @@ -51,8 +51,8 @@ var formation = new Formation(teamsCount,6); - - + +