1 / 17

ACM 511

ACM 511. IntroductION to CLIENT-SIDE WEB PROGRAMMING. Javascript. Javascript. Javascript. Determining the Length of a String. Changing the Case of a String. Searching a String: indexOf ( ) Technique. Extracting Part of a String with slice( ). Extracting Part of a String with slice( ).

noura
Download Presentation

ACM 511

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. ACM 511 IntroductION to CLIENT-SIDE WEB PROGRAMMING ACM 262 Course Notes

  2. Javascript ACM 262 Course Notes

  3. Javascript ACM 262 Course Notes

  4. Javascript ACM 262 Course Notes

  5. Determining the Length of a String ACM 262 Course Notes

  6. Changing the Case of a String ACM 262 Course Notes

  7. Searching a String: indexOf( ) Technique ACM 262 Course Notes

  8. Extracting Part of a String with slice( ) ACM 262 Course Notes

  9. Extracting Part of a String with slice( ) ACM 262 Course Notes

  10. Document Object Model When a Web browser loads an HTML file, it displays the contents of that file on the screen (appropriately styled with CSS, of course). But that’s not all the Web browser does with the tags, attributes, and contents of the file: it also creates and memorizes a “model” of that page’s HTML. In other words, the Web browser remembers the HTML tags, their attributes, and the order in which they appear in the file—this representation of the page is called the Document Object Model, or DOM for short. The DOM provides the information needed for JavaScript to communicate with the elements on the Web page. The DOM also provides the tools necessary to navigatethrough, change, and add to the HTML on the page. The DOM itself isn’t actually JavaScript—it’s a standard from the World Wide Web Consortium (W3C) that most browser manufacturers have adopted and added to their browsers. The DOM lets JavaScript communicate with and change a page’s HTML. ACM 262 Course Notes

  11. Selecting Page Elements ACM 262 Course Notes

  12. Selecting Page Elements ACM 262 Course Notes

  13. DOM Relationships ACM 262 Course Notes

  14. DOM Relationships ACM 262 Course Notes

  15. DOM Relationships ACM 262 Course Notes

  16. Example 5.1 ACM 262 Course Notes

  17. Problem with DOM A further complication is that the major browsers interpret the DOM differently.The techniques presented in the earlier pages of this chapter are all cross-browsercompatible, but other parts of the DOM standard aren’t. For example, InternetExplorer handles events differently from other browsers; the same HTML can producemore text nodes in Firefox and Safari than in Internet Explorer; and IEdoesn’t always retrieve HTML tag attributes in the same way as Firefox, Safari, orOpera. In addition, different browsers treat white space (like tabs and spaces) in HTML differently—in some cases treating white space like additional text nodes(Firefox and Safari) and in other cases ignoring that white space (InternetExplorer). And those are just a few of the differences between how the most commonWeb browsers handle the DOM. ACM 262 Course Notes

More Related