Autopopulating text input fields demo

This is a demo document for the technique described in the article Autopopulating text input fields with JavaScript. Please refer to the article for details and context.

With JavaScript enabled, the label element is hidden and the value of the input element's title attribute is copied to the value attribute.

When JavaScript is not available, the label is displayed above the text input, which is left empty.

Load this page with JavaScript enabled and disabled to see the difference.

You may notice that the label is displayed briefly before the script hides it. This can be circumvented by running the script when the DOM is ready instead of on window.load, but that is beyond the scope of this demo.

Lab Index | 456 Berea Street Home | Copyright © 2003-2014 Roger Johansson