tailieunhanh - Học JavaScript qua ví dụ part 1
JavaScript là gì JavaScript là một mục đích chung ngôn ngữ kịch bản phổ biến được sử dụng để đưa năng lượng và pizzaz vào các trang Web khác chết bằng cách cho phép một trang để tương tác với người dùng và đối phó với các sự kiện xảy ra trên trang. JavaScript đã được mô tả như là gắn kết mọi trang web với nhau. Nó sẽ là một nhiệm vụ khó khăn để tìm thấy một trang web thương mại, hoặc gần như trang web nào, điều đó không có chứa một số mã JavaScript . | chapter 1 Introduction to JavaScript 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 It would be a hard task to find a commercial Web page or almost any Web page that does not contain some JavaScript code see Figure . JavaScript originally called LiveScript was developed by Brendan Eich at Netscape in 1995 and was shipped with Netscape Navigator 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. 1. But the creator of JavaScript Brendan Eich says it s even more In his article Innovators of the Net Brendan Eich and
đang nạp các trang xem trước