Changing Properties


Making your web pages dynamic can be as easy as setting visual properties at runtimebrowsers didn't used to change their displays when you did so, but since IE4, they do. Here's an example that changes the background color of a web page to green when the user clicks it (you'll need version 6+ if you're using Netscape Navigator):

(Listing 16-01.html on the web site)
 <HTML>      <HEAD>          <TITLE>              Setting Background Color          </TITLE>      </HEAD>  <BODY ONMOUSEDOWN="document.bgColor='green'">  <H1>              Click this page to turn it green.          </H1>      </BODY>  </HTML> 

That's the most basic level of Dynamic HTMLchanging visual properties, such as a page's title or text color, on-the-fly .



Inside Javascript
Inside JavaScript
ISBN: 0735712859
EAN: 2147483647
Year: 2005
Pages: 492
Authors: Steve Holzner

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net