• Complain

Ellie Quigley [Ellie Quigley] - JavaScript by Example, Second Edition

Here you can read online Ellie Quigley [Ellie Quigley] - JavaScript by Example, Second Edition full text of the book (entire story) in english for free. Download pdf and epub, get meaning, cover and reviews about this ebook. year: 2010, publisher: Prentice Hall, genre: Computer. Description of the work, (preface) as well as reviews are available. Best literature library LitArk.com created for fans of good reading and offers a wide selection of genres:

Romance novel Science fiction Adventure Detective Science History Home and family Prose Art Politics Computer Non-fiction Religion Business Children Humor

Choose a favorite category and find really read worthwhile books. Enjoy immersion in the world of imagination, feel the emotions of the characters or learn something new for yourself, make an fascinating discovery.

Ellie Quigley [Ellie Quigley] JavaScript by Example, Second Edition

JavaScript by Example, Second Edition: summary, description and annotation

We offer to read an annotation, description, summary or preface (depends on what the author of the book "JavaScript by Example, Second Edition" wrote himself). If you haven't found the necessary information about the book — write in the comments, we will try to find it.

The Worlds Easiest Java ScriptTutorialFully Updated!

JavaScript by Example, SecondEdition, is the easiest, most hands-on way to learnJavaScript. Legendary programming instructor Ellie Quigley hasthoroughly updated her classic book to deliver the skills andinformation todays JavaScript users needmostincluding up-to-the-minute coverage of JavaScriptprogramming constructs, CSS, Ajax, JSON, and the latest JavaScriptlibraries and best practices.

Quigley illuminates every technique withfocused, classroom-tested code examples, detailed line-by-lineexplanations, and real program output. This exceptionally clear,easy-to-understand book takes you from your first script toadvanced techniques. Its the only JavaScript bookyoull ever need!

New in This Edition

  • End-of-chapter study tools, includingclassroom-tested labs

  • Programming the DOM

  • More Cascading Style Sheets

  • Introduction to Ajax and JSON

  • Explanation of how to develop interactiveWeb applications with dynamic, desktop-style interfaces

  • Programmers preparation for HTML5s breakthrough capabilities

  • This edition has been completely updated andincludes many new and completely rewritten code examples; containsfully revised and updated coverage of Cascading Style Sheets (CSS)and the Document Object Model (DOM); and fully covers modernJavaScript concepts, principles, and programming techniques.

    Thousands of Web developers, administrators,and power users have relied on JavaScript by Example tobecome expert JavaScript programmers. With this new edition, youcan, tooeven if youre completely new to JavaScript.After youve become an expert, youll turn to this bookconstantly as the best source for trustworthy answers, solutions,and code.

    Ellie Quigley [Ellie Quigley]: author's other books


    Who wrote JavaScript by Example, Second Edition? Find out the surname, the name of the author of the book and a list of all author's works by series.

    JavaScript by Example, Second Edition — read online for free the complete book (whole text) full work

    Below is the text of the book, divided by pages. System saving the place of the last page read, allows you to conveniently read the book "JavaScript by Example, Second Edition" online for free, without having to search again every time where you left off. Put a bookmark, and you can go to the page where you finished reading at any time.

    Light

    Font size:

    Reset

    Interval:

    Bookmark:

    Make
    Chapter 1. Introduction to JavaScript

    11 What JavaScript Is JavaScript is a popular general-purpose scripting - photo 1

    1.1 What JavaScript Is

    JavaScript is a popular general-purpose scripting language used to put energy and pizzaz into otherwise dead Web pages by allowing a page to interact with users and respond to events that occur on the page. JavaScript has been described as the glue that holds Web pages together.).

    Figure 1.1 A dynamic Web page using JavaScript to give it life. For example, if the user rolls the mouse over any of the text after the arrows, the text will become underscored links for navigation.

    JavaScript originally called LiveScript was developed by Brendan Eich at - photo 2

    JavaScript, originally called LiveScript, was developed by Brendan Eich at Netscape in 1995 and was shipped with Netscape Navigator 2.0 beta releases. JavaScript is a scripting language that gives life, hence LiveScript, to otherwise static HTML pages. It runs on most platforms and is hardware independent. JavaScript is a client-side language designed to work in the browser on your computer, not the server. It is built directly into the browser (although not restricted to browsers), Microsoft Internet Explorer and Mozilla Firefox being the most common browsers. In syntax, JavaScript is similar to C, Perl, and Java; for example, if statements and while and for loops are almost identical. Like Perl, it is an interpreted language, not a compiled language.

    Because JavaScript is associated with a browser, it is tightly integrated with HTML. Whereas HTML is handled in the browser by its own networking library and graphics renderer, JavaScript programs are executed by a JavaScript interpreter built into the browser. When the browser requests such a page, the server sends the full content of the document, including HTML and JavaScript statements, over the network to the client. When the page loads, HTML content is read and rendered line by line until a JavaScript opening tag is read, at which time the JavaScript interpreter takes over. When the closing JavaScript tag is reached, the HTML processing continues.

    JavaScript handled by a browser is called client-side JavaScript. Although JavaScript is used mainly as a client-side scripting language, it can also be used in contexts other than a Web browser. Netscape created server-side JavaScript to be programmed as a CGI language, such as Python or Perl, but this book will address JavaScript as it is most commonly usedrunning on the client side, your browser.

    1.2 What JavaScript Is Not

    JavaScript is not Java. Java is to JavaScript what Car is to Carpettypes must be declared. JavaScript types such as variables, parameters, and function return types do not have to be declared. Java programs are compiled. JavaScript programs are interpreted by a JavaScript engine that lives in the browser.

    JavaScript is not HTML, but JavaScript code can be embedded in an HTML document and is contained within HTML tags. JavaScript has its own syntax rules and expects statements to be written in a certain way. JavaScript doesnt understand HTML, but it can contain HTML content within its statements. All of this will become clear as we proceed.

    JavaScript is not used to read or write the files on client machines with the exception of writing to cookies (see ). It does not let you write to or store files on the server. It does not open or close windows already opened by other applications and it cannot read from an opened Web page that came from another server.

    JavaScript is object based but not strictly object oriented because it does not support the traditional mechanism for inheritance and classes found in object-oriented programming languages, such as Java and C++. The terms private, protected, and public do not apply to JavaScript methods as with Java and C++.

    JavaScript is not the only language that can be embedded in an application. VBScript, for example, developed by Microsoft, is similar to JavaScript, but is embedded in Microsofts Internet Explorer.

    1.3 What JavaScript Is Used For

    JavaScript programs are used to detect and react to user-initiated events, such as a mouse going over a link or graphic. They can improve a Web site with navigational aids, scrolling messages and rollovers, dialog boxes, dynamic images, and so forth. JavaScript lets you control the appearance of the page as the document is being parsed. Without any network transmission, it lets you validate what the user has entered into a form before submitting the form to the server. It can test to see if the user has plug-ins and send the user to another site to get the plug-ins if needed. It has string functions and supports regular expressions to check for valid e-mail addresses, Social Security numbers, credit card data, and the like. JavaScript serves as a programming language. Its core language describes such basic constructs as variables and data types, control loops, if/else statements, switch statements, functions, and objects. It is used for arithmetic calculations, manipulates the date and time, and works with arrays, strings, and objects. It handles user-initiated events, sets timers, and changes content and style on the fly. JavaScript also reads and writes cookie values, and dynamically creates HTML based on the cookie value.

    1.4 JavaScript and Its Place in a Web Page
    1.4.1 Analysis of the Diagram
    The Players

    The players in are the applications involved in the life cycle of a Web page:

    1. A browser (Firefox, Internet Explorer, Safari, Opera). This is where JavaScript lives!

    2. A network (HTTP).

    3. A server (Apache, Windows IIS, Zeus).

    4. A server module (PHP, ASP.NET, ColdFusion, Java servlet).

    5. External files and/or a database (MySQL, Oracle, Sybase).

    Figure 1.2 The life cycle of a typical Web page.

    The Steps illustrates the life cycle of a Web page from when the client makes a - photo 3

    The Steps

    illustrates the life cycle of a Web page from when the client makes a request until it gets a response.

    1. On the left hand side of the diagram, we see the client, or browser where the request is made. The user makes a request for a Web site by typing the address of the Web site in the browsers URL location box. The request is transmitted to the server via Hypertext Transfer Protocol (HTTP). The Web server on the other side accepts that request. If the request is for an HTML file, the Web server responds by simply returning the file to the clients browser. The browser will then render the HTML tags, format the page for display, and wait for another request. If the page contains JavaScript tags, the JavaScript interpreter will handle that code based on a user-initiated event such as clicking a button, rolling a mouse over a link or image, or submitting a form. It is with JavaScript that the page becomes interactive. JavaScript detects whatever is happening on the page and responds. It handles fillout forms, feedback, animation, slide-shows, and multimedia. It responds to a key press, a mouse moving over an image, or a user submitting a form. It can read cookies and validate data. It can dynamically change a cell in an HTML table, change the text in a paragraph, or add a new bullet item to a list. But it doesnt do everything. It cannot close a window it didnt open, query a database, update the value in a file upload field, or write to files on a server. After the JavaScript interpreter has completed its tasks, and the page has been fully rendered, another request can be made to the server. Going back and forth between the browser and the server is known as the Request/Response loop, the basis of how the Web works.

    Next page
    Light

    Font size:

    Reset

    Interval:

    Bookmark:

    Make

    Similar books «JavaScript by Example, Second Edition»

    Look at similar books to JavaScript by Example, Second Edition. We have selected literature similar in name and meaning in the hope of providing readers with more options to find new, interesting, not yet read works.


    Reviews about «JavaScript by Example, Second Edition»

    Discussion, reviews of the book JavaScript by Example, Second Edition and just readers' own opinions. Leave your comments, write what you think about the work, its meaning or the main characters. Specify what exactly you liked and what you didn't like, and why you think so.