|
Fall Semester 2002 |
DHTML has been a turf in turmoil over the last few years.
Well, I guess one can say that. But things have changed for the better.
Here are some notes from the past whose usefulness has changed over time:
We first describe DOM. We start with an example:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN>
<html>
<head>
<title>DOM Nodes</title>
<script type="text/javascript" language="Javascript">
function changeGreeting() {
var theNode = getObj("greeting");
var newGreeting = window.prompt("Type a greeting.", "Yo!");
theNode.firstChild.nodeValue = newGreeting;
}
function getObj(elementID) {
return document.getElementById(elementID);
}
</script>
</head>
<body>
<p>
<span id="greeting">Hi!</span>
My name is Larry Bird.
</p>
<p>
<a href="javascript:changeGreeting();">Change Greeting</a>
</p>
</body>
</html>
This simple example would be enough for you to finish Homework Four. But we have two goals:
appendChild() | |
appendData() | |
caption | |
cellIndex | |
cells | |
childNodes[] | |
className | |
cloneNode() | |
createCaption | |
createElement() | |
createTextNode() | |
data | |
deleteCaption() | |
deleteCell() | |
deleteData() | |
deleteRow() | |
deleteTFoot() | |
deleteTHead() | |
disabled | |
documentElement | |
firstChild | |
getAttribute | |
getElementById | |
getElementsByTagName() | |
hasChildNodes() | |
href | |
id | |
innerHTML | |
insertBefore() | |
insertCell() | |
insertData() | |
insertRow() | |
lastChild | |
name | |
nextSibling | |
nodeName | |
nodeType | |
nodeValue | |
ownerDocument | |
parentNode | |
previousSibling | |
remove() | |
removeChild() | |
replaceChild() | |
rowIndex | |
rows[] | |
setAttribute | |
specified | |
splitText() | |
tagName | |
tBodies[] | |
tFoot | |
tHead | |
title | |
value |
These are methods and properties of DOM1 that work reliably in modern browsers.
How about those links?
Here they are:
webreview.com
But you already have what you need.