Your two statements may or may not both select the same document node.
I think the first version is more likely to be successful, not because of its syntax but because it addresses the collection document.forms . document.myForm... may also work but I would personally be less inclined to rely on it, cross-browser.
Both the statements are working properly. But i want to know how the 2nd statement is also working. How it is recognizing the myForm as form name. In the 1st statement, form is a keyword. But in the 2nd statement we are not specifying myForm as form name.