1 / 7

HTML

HTML. Markup language - controls appearance & content of a document. <html> </html>. Javascripts. <head> </head>. <script> </script>. trigger function execution. <body> </body>. <img /> <form> </form>. events. HTML tags. JS Functions Defined. <html>

liliha
Download Presentation

HTML

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. HTML Markup language - controls appearance & content of a document <html> </html> Javascripts <head> </head> <script> </script> trigger function execution <body> </body> <img /> <form> </form> events HTML tags

  2. JS Functions Defined <html> </html> function F1(p) { } <head> </head> <script> </script> <body> </body> JS Functions Execution Triggered by Events

  3. How to access HTML Elements for processing id attribute - uniquely identifies an HTML element used in place of name attribute getElementById ( id ) "DOM' method - lets youretrieve an HTML element - document.getElementById (id) .value

  4. How to use id & getElementById ... in tandem To dynamically alter html elements On the client side

  5. function F1(p) { } Access cell by id <head><script> </script></head> style.background='tan' Change attribute Cell Event In Table document. getElementById(p). document. getElementById(p). firstChild.data="Goodbye" id attribute <body> </body> <table><tr> </tr></table> 1st sub-element of <td> <td > </td> id = 11 onclick="F1(id)" Hello data

  6. DOM Hierarchy document head title cell by id firstChild Html element could have been an img tag data src height with its attributes text

  7. function F1(p) { } <head><script> </script></head> Cell Event In Table document. getElementById(p). firstChild.src="eagle.gif" <body> </body> <table><tr> </tr></table> 1st sub-element of <td> <td > </td> id = 11 onclick="F1(id)" <img src='us.gif' >

More Related