1 Star 0 Fork 0

linyangkai/网页设计大作业

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
Game.html 1.58 KB
一键复制 编辑 原始数据 按行查看 历史
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=0, minimal-ui">
<title></title>
<link rel="stylesheet" type="text/css" href="css/Game.css" />
<script src="js/cookie.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
function Initialization()
{
var scriptsrc = "";
var strCookie = getCookie("game");
console.log(strCookie);
if(strCookie==""||strCookie==null)
{
alert("游戏类型为空,跳转回首页");
window.location.href = "index.html";
return;
}
switch(strCookie)
{
case "2048":
scriptsrc = "js/Game/2048.js";
break;
case "Gobang":
scriptsrc = "js/Game/Gobang.js";
break;
case "Sudoku":
scriptsrc = "js/Game/Sudoku.js";
break;
}
var oHead = document.getElementsByTagName('HEAD').item(0);
var oScript = document.createElement("script");
oScript.type = "text/javascript";
oScript.src = scriptsrc;
oHead.appendChild(oScript);
setTimeout("begin()", 1000);
}
function begin()
{
InitializationforGame();
}
</script>
</head>
<body onload="Initialization()">
<header>
<a href="index.html" id="returnindex">返回首页</a>
</header>
<section>
<canvas id="myCanvas" onclick="inputloc(event)" onpre></canvas>
</section>
<audio id="music" src="video/play.mp3">你的浏览器不支持audio标签。</audio>
</body>
</html>
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
HTML
1
https://gitee.com/tkkeni/WebDesign.git
[email protected]:tkkeni/WebDesign.git
tkkeni
WebDesign
网页设计大作业
master

搜索帮助