Example A

A Poorly Implemented Dynamic Label

This Dynamic Label script is an example of how not to write DHTML. It relies on the following code:

  <input 
    type="text" 
    name="username"
    onfocus="if ('Username' == this.value) this.value = '';" 
    onblur="if ('' == this.value) this.value = 'Username';"
    value="Username" />

It exibits several problems including: