Fedora web server - 95Chapter 8Window and Document ObjectsThe sole parameter of

95Chapter 8Window and Document ObjectsThe sole parameter of this method is a quoted string containing the ID of the element youwish to reference. The method returns a value, which you typically preserve in a variable foruse by subsequent script statements: var oneTable = document.getElementById( salesResults ); After the assignment statement, the variable represents the element object, allowing you toget and set its properties or invoke whatever methods belong to that type of object. The next logical step past the document level in the object hierarchy is the form. That swhere you will spend the next lesson. Exercises1.Which of the following references are valid and which are not? Explain what is wrongwith the invalid references. a.window.document.form[0] b.self.entryForm.submit() c.document.forms[2].named.document.getElementByID( firstParagraph ) e.newWindow.document.write( Howdy ) 2.Write the JavaScript statement that displays a message in the status bar welcoming vis- itors to your Web page. 3.Write the JavaScript statement that executes while the page loads to display the samemessage from question 2 to the document as an

-level headline on the page. 4.Create a page that prompts the user for his or her name as the page loads (via a dialogbox) and then welcomes the user by name in the body of the page. 5.Create a page with any content you like, but one that automatically displays a dialogbox after the page loads to show the user the URL of the current page. …
Note: If you are looking for best quality webspace to host and run your tomcat application check Vision virtual web hosting services

Leave a Reply