Đang chuẩn bị liên kết để tải về tài liệu:
JavaScript Bible, Gold Edition part 7

Không đóng trình duyệt đến khi xuất hiện nút TẢI XUỐNG

JavaScript Bible, Gold Edition part 7. This book will bring programmers and non-technical professionals, including casual programmers and scripters, painlessly up to speed on all aspects of mastering JavaScript. Key topics include programming fundamentals, JavaScript language elements and how to use them effectively, and how to easily and efficiently add powerful new functionality to HTML documents and Java applets. | 24 Part I Getting Started with JavaScript Below the rule the script displays plain body text that combines static text with information about the browser you use to load the document. The script writes a stream of HTML information to the browser including a tag to render a portion of the information in boldface. Even though two lines of code are writing information to the page the result is rendered as one line just as it is when all the text is hard-coded in HTML. Entering Your First Script It s time to start creating your first JavaScript script. Launch your text editor and browser. If your browser offers to dial your Internet service provider ISP or begins dialing automatically cancel or quit the dialing operation. If the browser s Stop button is active click it to halt any network searching it may try to do. You may receive a dialog box message indicating that the URL for your browser s home page usually the home page of the browser s publisher unless you ve changed the settings is unavailable. That s fine. You want the browser open but you shouldn t be connected to your ISP. If you re automatically connected via a local area network in your office or school that s also fine. However you don t need the network connection for now. Next follow these steps to enter and preview your first JavaScript script 1. Activate your text editor and create a new blank document. 2. Type the script into the window exactly as shown in Listing 3-1. Listing 3-1 Source Code for script1.htm HTML HEAD TITLE My First Script TITLE HEAD BODY H1 Let s Script. H1 HR SCRIPT LANGUAGE JavaScript -- hide from old browsers document.write This browser is version navigator.appVersion document.write of B navigator.appName B . end script hiding -- SCRIPT BODY HTML 3. Save the document with the name script1.htm. This is the lowest common denominator filenaming convention for Windows 3.1 feel free to use an .html extension if your operating system allows it. 4. Switch to your browser. Chapter 3 Your

Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.