Program Specification: The purpose of this lab is for you to learn about buildin
ID: 3657735 • Letter: P
Question
Program Specification: The purpose of this lab is for you to learn about building active Web pages using JavaScript. Design Details: You can use Eclipse, notepad, emacs, or any other text editor for this lab. Do not use Wordpad and be careful of the text editor on a Mac, because their default is RichText, not plain text. The Web page should be password-protected. The page should have: A text field Two buttons that turn the page background red and green, respectively An if-else statement that gets a users' age and, depending on whether the user is a pre-teenager or older than a teenager, prints out an appropriate message about Miley Cyrus A drop-down menu with at least three choices, each of which causes a new page to appear.Explanation / Answer
This is a sample code to prevent the page for example here oops.html without entering the pasword....................... ///////////////////////////////////////////////////////////////////////////// The Button when clicked on it,calls the aaa function - user defined function. In the aaa function the background color of the document is changed to green. function aaa() { document.bgColor="#00ff00"; } /////////////////////////////////////////////////////////////////////////// function aaa(f) { if (f.qq[0].selected) alert("one"); if (f.qq[1].selected) alert("two"); if (f.qq[2].selected) alert("three"); } pre-teenager older teenager On the screen with a button having Press Me as the label , a drop down list box is also displayed. The select clause in the form makes as the default selected item of the list.qq is the name for the list box. pre-teenager is the first item or the zeroth element of the list box which is selected. If now clicked on the button, the output will be one as the selected property shows true .Select another item from the list and click on the button the output changes depending upon which element /object of the list box has been selected.Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.