Analysis of Jquery Sudoku game (I)-page layout

Source: Internet
Author: User

In addition, html5 will be transplanted if it is allowed in the recent time. It is also called H5sukudo.

The code for the body is as follows. The main layer is used to control the size of the page body. main contains two layers: canvas and tools, which are used to carry the data table and auxiliary information respectively. The tools layer contains seven layers: logo, level, lefts, timer, leftsg, btns, and err, it is used to hold the LOGO, game difficulty, number of remaining spaces, used time, number of remaining spaces, buttons, and error messages. The style in the tools layer is written in the default.css Style File. The content of the canvas layer, level layer, lefts layer, timer layer, leftsg layer, and err layer is dynamically generated by jquery, which will be explained later.
Copy codeThe Code is 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 = "emerge (g.canvas).gensukudo(2?##('{level'}.html ('level: '+ $ (this). val ();">
<Br/>
<Input type = 'button 'value = 'medium 'onclick = "emerge (g.canvas).gensukudo(336600000000('{level'}.html ('level: '+ $ (this). val ();">
<Br/>
<Input type = 'button 'value = 'hard' onclick = "comment (g.canvas).gensukudo(4);;(('{level'}.html ('level: '+ $ (this). val ();">
<Br/>
<Input type = 'button 'value = 'restart' style = "display: none;" onclick = "$ ('# sukudotable '). fadeOut (500); $ ('. 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>

Related Article

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.