So far you have set values with JavaScript but you can also examine HTML elements and find out the value of various things.
Replace the existing first paragraph in your JavaScript testing page with this:
<p id="first" style="font-family:Verdana">This is the first paragraph and <span onmouseover="fred();" style="color:red;">you should hover here</span>.</p>
and then put this in the function to replace the current lines:
alert(window.document.getElementById('first').style.fontFamily);
Save and load the page and hover over the red text.
You can obtain any other property of an element in this way including the contents of the element.
You can only obtain in-line styles in this way. Embedded and external styles can be obtained using JavaScript but the exact way to do this reliably is a bit too complicate for now. Stick with in-line until then.



