来源:flash,as,js兴趣爱好者HTML5小游戏之塔防 HTML5小游戏之塔防
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="Pragma" content="no-cache"/>
<meta http-equiv="Cache-Control" content="no-cache"/>
<meta http-equiv="Expires" content="Thu, 01 Jan 1970 00:00:01 GMT"/>
<meta http-equiv="Expires" content="0"/>
<title>HTML5 Tower Defense</title>
<style type="text/css">
html, body {margin: 0;padding: 0;font-size: 12px;line-height: 20px;font-family: Verdana, "Times New Roman", serif;background: #1A74BA;}h1 {padding: 0;margin: 0;line-height: 48px;font-size: 18px;font-weight: bold;font-family: Verdana, "Times New Roman", serif;letter-spacing: 0.12em;}#wrapper {margin: 0 auto;}#td-wrapper {padding: 8px 24px 60px 24px;background: #E0F4FC;}#td-board {display: none;font-size: 16px;}#td-board canvas#td-canvas {position: relative;background: #fff;border: solid 1px #cdf;}#td-loading {font-size: 18px;line-height: 48px;padding: 60px 0 120px 0;font-style: italic;}#about {color: #fff;padding: 8px 24px;}#about a {color: #fff;}
</style>
</head>
<body id="tower-defense">
<div id="wrapper">
<div id="td-wrapper">
<h1>HTML5 塔防游戏</h1>
<div id="td-loading">加载中...</div>
<div id="td-board">
<canvas id="td-canvas">抱歉,您的浏览器不支持 HTML 5 Canvas 标签,请使用 IE9 / Chrome / Opera 等浏览器浏览本页以获得最佳效果。</canvas>
</div>
</div>
</div>
<script type="text/javascript" src="td-pkg-min.js?fmts=1293962401.7"></script>
<script type="text/javascript">
window.onload = function () {
_TD.init("td-board", true);
document.getElementById("td-loading").style.display = "none";
document.getElementById("td-board").style.display = "block";
};
</script>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-307069-13']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
<script type="text/javascript">
var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://");
document.write(unescape("%3Cscript src='" + _bdhmProtocol + "hm.baidu.com/h.js%3Fe99baf24f819fcd0a35adeec04e55b97' type='text/javascript'%3E%3C/script%3E"));
</script>
</body>
</html>