Two introduction to menus, toolbars, and the actual use of the feature implementation. In fact it has gone against the teacher's teachings (to invent the Ming wheel himself).
JS has a ready-made drop-down list (select->option).
You must be familiar with it. And the Select drop-down list (onchange) is easy to use. Why do you have to design a similar menu and list box yourself?
1. Assume that there are many drop-down list entries for JS. More system resources may be consumed (at least when performed on my computer, other Windows flicker).
2. Assume that the toolbar is invisible, even though the Apple browser retains the drop-down list (the other browser is missing from the drop-down list). But it seems that the choice is invalid.
3. It is very difficult to change the content only by editing it in its own web page.
Let's take a look at a slightly exaggerated pull-down list:
Figure 1. Novel Reader (image version): Because it is a picture, the Web page can be more simple, just like the following lines:
<meta charset= "gb2312" >
<title>Javascript</title>
<link href= "Turnpage.css" rel= "stylesheet" type= "Text/css" >
<script type= "Text/javascript" src= "Jquery.min.js" ></script>
<script type= "Text/javascript" src= "Turn.min.js" ></script>
<script type= "Text/javascript" src= "Turnpage.js" ></script>
<body onload= "getimages ()" >
<div id= "book" ></div>
<div id= "Chaptmenu" ></div>
<div id= "Pgnumber" ><ss> chapters </ss><ss>page </ss> Total:<ss>ttlpage</ss> page </ Div>
</body>
The arrow to the right of the Blue Menu name "chapter" should be up (the character symbol can also be used icon), the contents of the list box is based on the original book folder to edit a file with a suffix. htm (due to Chinese, list labels, etc.) saved.
The format is generally as follows:
<meta charset= "gb2312" >
<li><span>25</span> JavaScript Overview </li>
<ul><li><span>26</span> 1.1 What is javascript</li>
<li><span>26</span>1.2 Version number of JavaScript </li>
<li><span>27</span>1.3 Client Javascript</li>
<li><span>33</span>1.4 Javascript</li> in other environments
<li><span>33</span>1.5 JavaScript Quest </li>
</ul>
<li><span>39</span> Lexical Structure </li>
<ul><li><span>39</span> 2.1 Character Set </li>
<li><span>40</span> 2.2 Uppercase and lowercase sensitive </li>
。。。
That is, the general list of lists, plus $ ("#chaptMenu"). Load ("menu1.htm"); Menuidex=true; Two lines of code. The folder will be available.
Mouse click on the Blue "chapter", the following code shows the list box
$ ("#pgnumber ss:eq (0)"). Live ("Click", Function () {
if (!menuidex) return; Assuming that the folder file is not installed, do nothing (otherwise an empty list box will be displayed).
$ ("#chaptMenu"). Show ();
$ ("#chaptMenu Li"). Show ();
});
Use the scroll bar to select the chapter you want to read and turn it over.
Flip effects such as the following:
Apple Browser Combat (iii)