Đang chuẩn bị liên kết để tải về tài liệu:
Javascript bible_ Chapter 4
Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ
Tải xuống
Tham khảo sách 'javascript bible_ chapter 4', công nghệ thông tin, kỹ thuật lập trình phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | Browser and Document Objects This chapter marks the first of nine tutorial chapters which compose Part II tailored to authors who have at least basic grounding in HTML concepts. You will see several practical applications of JavaScript and begin to see how a JavaScript-enabled browser turns familiar HTML elements into objects that your scripts control. Scripts Run the Show If you have authored in plain HTML you are familiar with how HTML tags influence the way content is rendered on a page when viewed in the browser. As the page loads the browser recognizes tags by virtue of their containing angle brackets as formatting instructions. Instructions are read from the top of the document downward and elements defined in the HTML document appear on screen in the same order in which they are entered in the document. As an author you do a little work one time up front adding the tags and the browser does a lot more work every time a visitor loads the page into a browser. Assume for a moment that one of the elements on the page is a text field inside a form. The user is supposed to enter some text in the text field and then click the Submit button to send that information back to the Web server. If that information must be an Internet e-mail address how do you ensure the user included the @ symbol in the address One way is to have a Common Gateway Interface CGI program on the server scan the submitted form data after the user has clicked the Submit button and the form information has been transferred to the server. If the user omitted or forgot the @ symbol the CGI program resends the page but this time with an instruction to include the symbol in the address. Nothing is wrong with this exchange but it means a significant delay for the user to find out that the address does not contain the crucial symbol. Moreover the Web server has APTI J In This Chapter What client-side scripts do What happens when a document loads How the browser creates objects How scripts refer to .