Jump to content

please,can some one solve my question.


Guest 3ch
 Share

Recommended Posts

1. Develop, test and validate an HTML document that collects the following information from the user: last name, first name, middle initial, age (restricted to be greater than 17), and weight (restricted to the range of the 800-300). You must have event handlers for the form elements that collect this information that check the input data for correctness. Messages in alert windows must be produced when errors are detected2. Develop, test, and validate an HTML document that has checkboxes for apple (59 cents each), orange (49 cents each), and banana (39 cents each), along with a Submit button. Each of the checkboxes should have its own onclick event handler. These handlers must add the cost of their fruit to a total cost. An event handler for the Submit button must produce an alert window with the message “Your total cost is: $xxx,” where xxx is the total cost of the chosen fruit, including 5 percent for sales tax. This handler must return false ( to avoid actual submission of the form data).3. Write a script that inputs a telephone number as a string in the form (852) 2209 7760. The script should use String method split to extract the area code as a token, the first four digits of the phone number as a token and the last four digits of the phone number as a token. Display the area code in one text field and the eight-digit phone number in another text field.4. Write a script that uses random number generation to create sentences. Use four arrays of strings called article, noun, verb and preposition. Create a sentence by selecting a word at random from each array in the following order: article, noun, verb, preposition, article and noun. As each word is picked, concatenate it to the previous words in the sentence. The words should be separated by spaces. When the final sentence is output, it should start with a capital letter and end with a period.For examples:The arrays should be filled as follows: the article array should contain the articles “the”, “a”, “one”, “some” and “any”; the noun array contain the noun “boy”, “girl”, “dog”,”town” and “car”; the verb array should contain the verbs “drove”, “jumped”,”ran”,”walked” and “skipped”; the preposition array should contain the prepositions “to”, “from”, “over”, “under” and “on”.

Link to comment
Share on other sites

We are here to help and give advice, not complete homework/coursework for anyone.Go through the tutorials and take the time to understand how javascript works: http://www.w3schools.com/js/default.aspAttempt each question first, then when you get stuck come ask for help and post your code. :)

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...