JavaScript primer classic

- "JavaScript Essentials (7th edition)"

Cumulative sales of more than 150 original 000!

Welcome you to use JavaScript! The use of this easy-to-use programming language can be enriched to the website to make better use of web pages. This book is an easy entry of the JavaScript tutorial, so, if not a computer expert, you can quickly learn this scripting.



This book-related information: http://turingbooks.javaeye.com/admin/blogs/363296

Readers

We suspect that since you are interested in learning JavaScript, then certainly to create HTML pages and Web site experience and want to go further to make the site more interactive. We do not ask you to understand any programming or scripting knowledge, do not ask you to be HTML experts (of course, if you are HTML experts also fine). We can only assume that you have the basic knowledge to build web pages, and familiar with the commonly used HTML tags, such as links, images and forms.

In some chapters the first entitled "The need to know HTML knowledge" of the table, we have done something to explain HTML. Not every part of the contents of this chapter, we believe that the only place you need only provide Info. With the HTML message, you do not need to read this book at the same time, then turned to another book to find the syntax of HTML attributes.

If you understand programming, should be noted that the way we introduced JavaScript with other very different style of book. We have no depth information on the syntax and structure of JavaScript, but this book is not a language-depth and comprehensive reference book (Appendix A, of course, provide some valuable content). The market in this area there are many good books, we set out in Appendix D in them. This book and the difference between these books is that we do not rigidly adhere to the form and presentation, they have focused on how to use JavaScript to accomplish some useful tasks, do not want to go a lot of additional information.

In the book's previous edition, we have increased the introduction of Ajax. The technology combines the use of JavaScript and other Web technologies commonly used to increase website interactivity, and improved Web site user experience. Ajax provides us with the basic knowledge and practical examples to help you increase the Ajax functionality to the site, rather than depth study of Web programming. In this version, we added more examples and Technology Ajax, because we found that all the concerns of Ajax is still warming up.

How to use this book

In this book, we have adopted some special format to help you more easily learn and understand.

Formed a step-by-step description of most of the contents of this book. We are in a special font style that HTML or JavaScript code, such as:

<div align="center">

window.onload = initLinks;

You also notice, HTML and JavaScript code are shown as lower case. To do so is because this version of all scripts are in line with the W3C (World Wide Web Consortium, World Wide Web Consortium) for XHTML 1.0 Transitional standard. When see quotes in JavaScript always straight quotation marks ( 'or "), rather than oblique quotation marks (' or"). JavaScript wide angle quotes will expire, in the preparation of the script should be avoided.

Step-by-step with the corresponding script, we have highlighted in bold script is part of the discussion, so that you will be able to immediately find the code we are discussing. We also often in the Web browser window to the screen map gray shading highlight the important part of some of them.

Because the books page narrower than the computer screen, so some firms JavaScript code page can not be ranked. When this occurs, we will be lines of code into multiple lines, in the follow-up visit by using the arrow → in front of that line which is continued and will continue the indent, as follows:

dtString = "Hey, just what are you

→ doing up so late? ";

On the browser

In the last edition, there is a big change: we no longer support the browser is very old or those in support of Web standards in browsers has done a poor job. We found that almost all Web users to upgrade to a modern browser, and they fully support the recognized Web standards (such as XHTML, CSS2 and DOM). This includes IE 6 or later, Firefox 1.0 or later, Netscape 7 or later, Safari all versions, as well as Opera 7 or later.

We have several operating systems on multiple browsers to test our script, these operating systems including Windows (XP and Vista), Mac OS X and Ubuntu Linux.

We use the most mainstream browsers - Microsoft Windows version of IE - tested all the contents of this book, and use the beta version of IE 8 has done a lot of testing (this book is in the final version of IE 8 release for printing) . We also use the Mac platform, Firefox 2 and 3, Safari 3 has done a test script. Applicable to S afari 3 for Mac, means that these scripts from the WebKit engine derived from any browser (such as Safari for Windows and Omni's OmniWeb) can be normal, based on KHTML (Safari most of the open-source start using a engine) browser (such as Konqueror for Linux) can also be normal use.

Do not have to enter the code

Some JavaScript books printed in the book only the script code, you must own in practice, enter the code. We believe that this approach has become obsolete. The authors have completed the input of these hard working, but you do not have to repeat these work. This book we provide a supporting Web site, which contains all the scripts in this book, you can copy and paste these scripts into their own web pages. This site also includes other tips and scripts. In the book, if we found any mistakes, corrections will be given here. This web site is the site supporting http://www.javascriptworld.com/.

If for some reason you wish to enter some sample script, it may find these examples it seems that does not work, this is because you have not used these examples to support the document. For example, in the image on the screen to achieve the effect of the sample, it is necessary to image files. But please be assured that these documents are on the book's Web site, and a good package for you to download. You find a downloadable file that contains all the scripts, HTML files, CSS files, and use all the media files. If you encounter any problems, you can view Web sites on the support FAQ (Frequently Asked Questions).

If you read the FAQ, and you have not yet been resolved, you can email us js7@javascriptworld.com. I am sorry to say, because too many messages received, we can not and will not respond to the question of who the book is sent to our personal e-mail address. However, we can ensure that mail sent to js7@javascriptworld.com will receive a response.

Begin

JavaScript is the best it can easily use a simple script on the page to achieve the effect of cool, and then gradually add more complex material. You do not have to wait until a complete study on this book can begin to improve their own web pages. Wait until you finish, you can use Ajax to add high-level cross-site effects.

Of course, the journey of a thousand miles begins with a single step, Welcome, do not lose out the window, when you do not use camera flash. JavaScript and Ajax to explore the journey has begun.