The properties of an object are accessed by two fixed methods: "." Notation and "[]" Square bracket notation:
Use the "." The notation accesses the standard object properties and uses the [] bracket notation to access the object properties defined by the page. As follows
document.forms["Myformname"].elements["Myinput"].value
Here, forms is a standard attribute of document, while table Single-name Myformname is defined by the page. Also, the elements and Value properties are standard attributes defined by the specification. and myinput is defined by the page.
If an attribute name is generated in execution, the square brackets are required if you have "Value1″," Value2″, and "Value3″ such attributes, and would like to use variable i=2 to access
This can be run:
myobject["value" +i]
This can not be:
Myobject.value+i
The above is a small series for you to bring the introduction of JS use [] to access the entire content of object properties, I hope to help you, a lot of support cloud Habitat Community ~