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); - - + +