代码如下
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>扫雷3.0</title>
<script src="jquery-1.11.0.js"></script>
<style>
.button{
background-color: crimson;
color: white;
display: inline-block;
font-size: 16px;
width:150px;
height:50px;
}
.square{
width: 41px;
height: 41px;
font-size: 16px;
color: black;
margin-left: 3px;
margin-top: 2px;
}
#mas{
width: 300px;height:30px;
position: absolute;
left: 1030px;
top: 570px;
font-size: 17px;
color: red;
}
</style>
</head>
<body bgcolor="#deb887">
<div style="float: top;
border:2px solid grey ;
width:100%;
height:100px;
margin: 0 auto; ">
</div>
<div id ="panel" style="float: top;
border:2px solid grey ;
width:400px;
height:400px;
margin: 0 auto; background-color: grey">
</div>
<div style="float: top;
border:2px solid grey ;
width:100%;
height:100px;
margin: 0 auto; ">
<input type="button"value="消除/插旗" style="position:relative;
margin-left: 500px;top: 10px" class="button" οnclick="mchange()">
<input type="button"value="重新开始" class="button" style="position:relative;
margin-left: 50px;top: 10px" οnclick="location.reload()">
<input type="text" id="mas" value="模式:消除">
</div>
</body>
<script>
var model=1;
var victory=0;
var sqnums=new Array();
var sqable=new Array();
$(function () {
for(var i=0;i