成品效果
<body>
<div id=game xss=removed></div>
</body>
/**
* js配置
*/
var config = {
width: 300,
height: 300,
img: ./img/fj.jpg,
gameDom: document.getElementById(game),
row: 3, //3行
col: 3 //3列
}
//经过计算的一些数据
var computed = {
num: config.col * config.row, //方块数量