In addition, the most recent time allowed will be transplanted to HTML5, the tentative name of H5sukudo is also the main purpose of practicing.
Body code as follows, the main page uses main layer to control dimensions, main contains two layers: canvas and tools, respectively, to host Sudoku tables and auxiliary information. The tools layer is nested logo,level,lefts,timer,leftsg,btns,err a total of seven layers, used to host the logo, game difficulty, remaining space, used time, the remaining number of blanks, buttons and error message. The styles in the tools layer are written in the Default.css style file. The contents of the canvas layer, level layer, lefts layer, timer layer, LEFTSG layer, and Err layer are dynamically generated by jquery control, followed by explanation.
Copy Code code as follows:
<body onselectstart= ' return false ' oncopy= ' return false ' oncut= ' return false ' >
<center>
<div id= "main" style= "width:720px; height:550px; " >
<div id= "Canvas" style= ' width:540px; height:540px; Float:left ' >
</div>
<div id= "Tools" >
<div id= "logo" >
Jsukudo
</div>
<div id= "Level" >
Level:
</div>
<div id= "Lefts" >
</div>
<div id= "Timer" >
Timer:
</div>
<div id= "LEFTSG" >
</div>
<div id= "Btns" >
<input type= ' button ' value= ' Easy ' onclick= ' $ (g.canvas). Gensukudo (2); $ (' #level '). HTML (' Level: ' +$ (This). Val ()); >
<br/>
<input type= ' button ' value= ' Medium ' onclick= ' $ (g.canvas). Gensukudo (3); $ (' #level '). HTML (' Level: ' +$ (This). Val ()) ;" >
<br/>
<input type= ' button ' value= ' Hard ' onclick= ' $ (g.canvas). Gensukudo (4); $ (' #level '). HTML (' Level: ' +$ (This). Val ()); >
<br/>
<input type= ' button ' value= ' restart ' style= ' display:none; ' onclick= ' $ (' #SukudoTable '). Fadeout (+) $ ('. C '). each (function () {if (This.num ()!=0) $ (this). Setempty (). check ();}); $ (' #SukudoTable '). FadeIn (500); >
<br/>
<br/>
<b><a href= "#" onclick= "$ (g.canvas). Unblock (). Block ({message:gameintruce, css: {width: ' 480px ', border: ' 3px Solid #a00 '}}); " >
Gameintroduce</a> <a href= "#" onclick= "$ (g.canvas). Unblock (). Block ({message:aboutgame, css: {width: ' 400px ') , border: ' 3px solid #a00 '}}); " >
Aboutsoftware</a> </b>
</div>
<div id= "Err" >
</div>
</div>
</center>
</body>