60 likes | 175 Vues
This lecture by Prof. Roy Levow provides an introduction to Dynamic HTML (DHTML), highlighting the differences between Microsoft DHTML and Netscape DHTML, which are not compatible. It covers how XHTML elements can be treated as objects with manipulable properties via scripts for dynamic effects. The lecture explains collections such as the 'all' and 'children' collections, illustrating the dynamic nature of styles and scripts across frames. Examples include changing font attributes and positions dynamically, demonstrating DHTML's versatility in web development.
E N D
COP 3813Intro to Internet Computing Prof. Roy Levow Lecture 7 DHTML Intro
Dynamic HTML • Warning! • Microsoft DHTML and Netscape DHTML are different • They are not compatable • Examples run under IE but not Netscape
Dynamic HTML Object Model • XHTML elements can be treated as objects • Their XHTML attributes become properties of the objects • The properties can be manipulated by scripts for dynamic effect • The id attribute defines the object name • Example: reference.html
Collections all and children • A collection is basically an array of related objects • The all collection consists of all XHTML elements of a document • The children collection of an object consists of all the immediately contained elements • Examples: all.html, children.html
Dynamic Styles • Styles can change dynamically • Example: dynamicstyle.htlm • Font attributes can change dynamically • Example: dynamicstyle2.html • Position can change dynamically • Example: dynamicposition.html
Cross Frame ScriptingNavigator Object • A script in one frame can reference items in another frame • Example: index.html, top.html • Navigator object • Provides information about browser displaying page • Example: navigator.html