JavaScript Minesweeper Game example (to be perfected)

Source: Internet
Author: User
<HTML>
<HEAD>
<title>javascript Mines </TITLE>
<style>
input.no {
background-color:eeeeee;
Border:none;
width:20;
height:20;
Color:blue;
}
Input.ye {
background-color:eeeeee;
Border:none;
width:20;
height:20;
color:red;
}
Input {
width:20;
height:20;
color:red;
}
INPUT.MODE0 {
width:50;
height:30;
Border-style:inset
}
Input.mode1 {
width:50;
height:30;
Color:green;
}
</style>
</HEAD>
<body bgcolor= "#000000" >
<div id=dilei style= "Position:absolute;left:0;top:5" >
<table border=0 cellspacing=0 cellpadding=0>
<script language= "JavaScript" >
<!--
var x,y=0;
while (document.write ("<tr>"), y++<20)
For (X=0;x++<20;document.write ("<td ><font size=-5><input id=" +x+ "_" +y+ "type=button>"))
;
-->
</SCRIPT>
</TABLE>
</div>
<div id=toolbar style= "position:absolute;top:5;left:401;/*height:300;*/background-color:green;width:200" >
<input id=mode Type=button value= "Digging Thunder" Class=mode1 onclick= "Javascript:modetab" (); ><nobr><span id=modenow style= "Color:blue" > can now uncover squares </span>
</div>
</BODY>
<script language= "JavaScript" >
<!--//34
var row,col,i=0;
var rowsize=20,colsize=20;
var minenum=45; Number of mines
var mode=1;
var minex=new array (minenum), miney=new Array (minenum);
var mine= new Array (rowsize), decouv= new Array (rowsize);
for (i=0;i<20;i++) {
Mine[i]=new Array (colsize);
decouv[i]= new Array (colsize);

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.