The author was still a small white, often by the QQ control or a variety of forums on a more attractive headline attracted, after the point opened but found that the Web page popped a dialog box, you must constantly click the annoying button countless times to close this page. At that time also used to search the corresponding tutorials on the Internet unfortunately has not been successful. After many years, the author also remembered the year's "tragic experience", so decided to share with readers here such an example.
Edit 4 files in Dreamweaver, index.html, question.html, confirm.html, result,html, respectively. The specific code is given below:
"Example 4-5 game start Page index.html"
on<! Doctype> Geneva"http://www.w3.org/1999/xhtml">GenevaGeneva<meta http-equiv="Content-type"Content="text/html; Charset=utf-8"/> to<meta name="Viewport"Content="width=device-width,initial-scale=1"> .<title> Game Start </title> -<link rel="stylesheet"href="Jquery.mobile-1.0.min.css"/> ,<script src="Jquery-1.7.1.min.js"></script> the<script src="Jquery.mobile-1.1.1.min.js"></script>Ten<!--<script type="Text/javascript"Src="Cordova.js"></script>--> One A<body> -<div data-role="page"> -<a href="question.html"data-role="Button"Data-rel="Dialog"> Start the game </a> the</div> -</body> -
"Example 4-6 asks if the reader is a mentally retarded page question.html"
on<! Doctype> Geneva"http://www.w3.org/1999/xhtml">GenevaGeneva<meta http-equiv="Content-type"Content="text/html; Charset=utf-8"/> to<meta name="Viewport"Content="width=device-width,initial-scale=1"> .<title> Honest! Are you retarded or not? </title> -<link rel="stylesheet"href="Jquery.mobile-1.0.min.css"/> ,<script src="Jquery-1.7.1.min.js"></script> the<script src="Jquery.mobile-1.1.1.min.js"></script>Ten<!--<script type="Text/javascript"Src="Cordova.js"></script>--> One A<body> -<div data-role="page"> - the<a href="result.html"data-role="Button"> You know it!!!! </a>//Skip to Final page -<a href="confirm.html"data-role="Button"Data-rel="Dialog"> die don't admit it! </a>//Continue looping -</div> -</body> +
"Example 4-7 another query page confirm.html"
on<! Doctype> Geneva"http://www.w3.org/1999/xhtml">GenevaGeneva<meta http-equiv="Content-type"Content="text/html; Charset=utf-8"/> to<meta name="Viewport"Content="width=device-width,initial-scale=1"> .<title> Honest! Are you retarded or not? </title> -<link rel="stylesheet"href="Jquery.mobile-1.0.min.css"/> ,<script src="Jquery-1.7.1.min.js"></script> the<script src="Jquery.mobile-1.1.1.min.js"></script>Ten<!--<script type="Text/javascript"Src="Cordova.js"></script>--> One A<body> -<div data-role="page"> - the<a href="result.html"data-role="Button"> I admit, I'm </a> <!--jump to the final page-- -<a href="question.html"data-role="Button"Data-rel="Dialog"> I'm not! </a><!--continue cycling-- -</div> -</body> +
"Example 4-8 game end page result.html"
on<! Doctype> Geneva"http://www.w3.org/1999/xhtml">GenevaGeneva<meta http-equiv="Content-type"Content="text/html; Charset=utf-8"/> to<meta name="Viewport"Content="width=device-width,initial-scale=1"> .<title> you this retarded </title> -<link rel="stylesheet"href="Jquery.mobile-1.0.min.css"/> ,<script src="Jquery-1.7.1.min.js"></script> the<script src="Jquery.mobile-1.1.1.min.js"></script>Ten<!--<script type="Text/javascript"Src="Cordova.js"></script>--> One A<body> -<div data-role="page"> - the</div> -</body> -
Run after 4-6, 4-7, 4-8, and 4-9 are shown.
First click on the "Start the Game" button, you will see the page has text asking whether the user admits that he is mentally retarded, if willing to admit that he is mentally retarded, you can go to the page shown in Figure 4-9, the game is over, otherwise it will have to repeat.
4-6 4-7 4-8 4-9
Don't hesitate, want to learn more app games, want to learn the simplest hand tour development, do this book "Building cross-platform App:jquery Mobile mobile Application Combat" example is good.