Module 7: Accessing DOM with JavaScript презентация
Содержание
- 2. Agenda Introducing DOM Manipulating DOM with JavaScript Cookies and Storages Useful
- 3. Introducing DOM
- 4. What is "DOM"? DOM – an acronym for Document Object Model.
- 5. DOM Tree
- 6. What DOM Defines?
- 7. What can do JavaScript with DOM?
- 8. Manipulating DOM with JavaScript
- 9. Finding Elements
- 10. Finding HTML Elements by id var t = document.getElementById('target'); Will find
- 11. Finding HTML Elements by Tag Name var p = document.getElementsByTagName('p'); Will
- 12. Finding HTML Elements by Class Name var p = document.getElementsByClassName('target'); Will
- 13. Changing HTML
- 14. Changing HTML Content document.getElementById(id).innerHTML = New value Will replace inner content
- 15. Changing the Value of an Attribute document.getElementById(id).attribute = New value Will
- 16. Changing HTML Style document.getElementById(id).style.property = New value Will replace inner content
- 17. Using Events A JavaScript can be executed when an event occurs,
- 18. Sample onclick() Event Handler
- 19. Cookies and Storages
- 20. What are Cookies? Cookies are data, stored in small text files,
- 21. Create a Cookie with JavaScript JavaScript can create, read, and delete
- 22. Read a Cookie To read a cookie: var x = document.cookie;
- 23. Changing and Deleting Cookie Changing cookie is made same way as
- 24. Sample Function to Set a Cookie The parameters of the function
- 25. Sample Function to Get a Cookie Take the cookiename as parameter
- 26. HTML5 Web Storage With HTML5, web pages can store data locally
- 27. HTML5 Web Storage Objects
- 28. Initial Check Before using web storage, check browser support for localStorage
- 29. Using Storage Objects There are methods to use storage objects: .setItem()
- 30. Sample Use of localStorage
- 31. Useful links
- 32. Useful Links HTML DOM на сайті Wikipedia: http://en.wikipedia.org/wiki/Document_Object_Model W3Schools JavaScript HTML
- 33. Thank you!
- 34. Скачать презентацию
































Слайды и текст этой презентации
Скачать презентацию на тему Module 7: Accessing DOM with JavaScript можно ниже:
Похожие презентации