Unsafe Names for HTML Form Controls

Extra Properties: document

Non-Standard Named Properties

A browser may add a property to the document for each named (or id'd) FORM element, IMG, or possibly any other element. Alternatively, the same browser may implement a specialized [[Get]] method to find the property.

<form action="" id="testFormID" name="testFormName">
</form>
    404
<img name="testImgNAME" src="">
  link
<a name='testLinkNAME'>link</a>
 

Non Standard

Accessing objects from the document collection is not standard and unsafe.

The extra properties added to document can cause problems with Event Handler Content Attributes as we will see later on.

Table of Contents