This is a relevant fact because usually if you confine your scripting to a combination of the W3C’s Level One Core DOM and ECMAScript, you’ll be pretty successful at achieving cross-browser scripting compatibility. The W3C’s Level One Core DOM is basically a set of properties and methods that can be accessed from a given element. For example, one of the most ubiquitous (and dastardly, in many people’s opinion) methods is the window.open() method, which makes it possible for advertising pop-ups to appear. The open() method acts upon the window object, which, although not an element (the DOM isn’t restricted to elements), is still an object that can be manipulated by script.
Using event handlers
Notice the onclick attribute in the following code fragment:onclick=“this.style.fontSize=‘60px’; this.style.color=‘red’”>
This tells the browser that when the user clicks the div element, something should happen. In this case, that something is that the following two attributes of the style element will change:
When one of these events takes place, code is executed. Many browsers have their own, custom event handlers, but if you stick with those found, you’ll find cross-compatibility issues much easier to solve.
It’s all about objects
This is the key to all DHTML and working with the DOM. When script accesses an object, it does the same thing you need to do when finding objects on your computer. When you look for a file on your hard drive, you drill down a group of nested folders to find something. So the final path might look something like this:C:Documents and SettingsChuckBooksgoodbook.doc
On the World Wide Web, the same thing happens:
HTML Related Interview Questions
|XML Interview Questions||HTML 4 Interview Questions|
|HTML Interview Questions||HTML 5 Interview Questions|
|HTML DOM Interview Questions||Java Interview Questions|
|CSS Interview Questions||Java Abstraction Interview Questions|
|Dynamic HTML Interview Questions||XHTML Interview Questions|
All rights reserved © 2020 Wisdom IT Services India Pvt. Ltd
Wisdomjobs.com is one of the best job search sites in India.