WesleyA Posted September 6, 2015 Share Posted September 6, 2015 (edited) Hi all, Im pretty much a noob to javascript. I try to get how the statements work together. if you have a javascript command like this: document.all.myFile.innerText Then document is an object and so is all myFIle is a variable but what is innerText ? Is that a property or a method? Are there any obligations in writing these commands? like this: object.subobject.property.method? Or are you free to use these through each other? Edited September 6, 2015 by WesleyA Link to comment Share on other sites More sharing options...
davej Posted September 6, 2015 Share Posted September 6, 2015 AFAIK, you have to start with a reference, and work your way down, level by level. For example for document you can find a list such as the one on this page... http://www.w3schools.com/jsref/dom_obj_document.asp document.all seems to be an obsolete Microsoft property. https://msdn.microsoft.com/library/ms537434%28v=vs.85%29.aspx Link to comment Share on other sites More sharing options...
Ingolme Posted September 7, 2015 Share Posted September 7, 2015 Every object has properties. The properties may also be objects which have their own properties. There is a hierarchy, you have to know which objects have which properties. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now