ECA 225
80 likes | 248 Vues
ECA 225. Applied Online Programming. Dynamic Content. IE DOM. IE DOM treats every two-sided HTML tag as having an “inner” and “outer” part inner content lying between open and close tags OUTER content lying between open and close tags tags and attributes themselves.
ECA 225
E N D
Presentation Transcript
ECA 225 AppliedOnline Programming Dynamic Content ECA 225 Applied Interactive Programming
IE DOM • IE DOM treats every two-sided HTML tag as having an “inner” and “outer” part • inner • content lying between open and close tags • OUTER • content lying between open and close tags • tags and attributes themselves ECA 225 Applied Interactive Programming
innerText ( IE4 + ) • refers to text between opening and closing tags, not including tags returns <p id="myid">Here is some <b>interesting</b> text</p> innerT = document.all.myid.innerText Here is some interesting text ECA 225 Applied Interactive Programming
outerText ( IE4 + ) • refers to text between opening and closing tags, not including tags returns <p id="myid">Here is some <b>interesting</b> text</p> outerT = document.all.myid.outerText Here is some interesting text ECA 225 Applied Interactive Programming
innerHTML ( IE4 + & W3C) • refers to text between opening and closing tags, including tags inside opening & closing tags returns <p id="myid">Here is some <b>interesting</b> text</p> innerH = document.all.myid.innerHTML Here is some interesting text ECA 225 Applied Interactive Programming
outerHTML ( IE4 + ) • refers to text and any other HTML tags inside opening & closing tags, including tags returns <p id="myid">Here is some <b>interesting</b> text</p> outerH = document.all.myid.outerHTML <p id="myid">Here is some <b>interesting</b> text</p> ECA 225 Applied Interactive Programming
outerHTML ( IE4 + ) • to change an actual tag in IEDOM using outerHTML • assuming the document contains an <h1> with an id of ‘header1’ • change the <h1> tagset to an <h4> tagset document.all.header1.outerHTML = “<h4>This is a header. </h4>”; ECA 225 Applied Interactive Programming
Object Placement for Breed Example name object group object general_appearance object club_link object floating_image object ECA 225 Applied Interactive Programming