I saw this in some code:
var _0xdf50x7 = document['createElement']('form');
How does this work? Does this mean that an object’s methods can be accessed like the elements of an array?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Since the
createElement()method is a member of thedocumentobject, it can be accessed using either dot notation:Or bracket notation:
This can be useful if the name of the method to call is stored in a variable:
It can also be used if the actual method to call depends on external conditions. Here is a (contrived) example: