cohen-salama / combining-html-and-javascript-plus-dom

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Combining HTML and JavaScript + DOM Lab

Question One

a. Make a website that prompts the user for a string, then a number. Then show a popup that displays the string that many times

b. Instead of showing a popup, make the text appear on the screen.

Question Two

a. Make a website that prompts the user for a string, then alerts them of whether or not the number is even.

b. Instead of showing a popup, make the text appear on the screen.

Question Three

a. Make a website with an input field and a button. Have a heading at the top that reads "Double your number below" When the user clicks on the button, display an alert showing that number times two.

b. Instead of showing a popup, make the doubled number appear in a paragraph below.

c. Make the doubled number instead appear inside the input

Question Four

a. Make a website with a heading at the top that reads "Palindrome detector". Add an input field and a button. When the user clicks the button, display an alert that says whether or not the text in the input field is a palindrome (the same backwards and forwards).

b. Instead of showing a popup, have that information appear in a paragraph below the button.

Question Five

a. Make a website with a heading at the top that reads "String Uppercaser". Add an input field and a button. When the user clicks the button, display an alert that contains the uppercased text of the input text field.

b. Instead of showing a popup, have that information appear in a paragraph below the button.

c. Have the uppercased overwrite the text that was there before.

Question Six

a. Make a website with a heading at the top that reads "String Capital Counter". Add an input field and a button. When the user clicks the button, display an alert that contains a count of how many capital letters are in the string.

b. Instead of showing a popup, have that information appear in a paragraph below the button.

Question Seven

a. Make a website with a heading at the top that reads "String Capital Counter Comparer". Add 2 input fields and a button. When the user clicks the button, display an alert that shows which string has more capital letters in it.

b. Instead of showing a popup, have that information appear in a paragraph below the button.

Question Eight

a. Make a website with a heading at the top that reads "Average of Three Numbers". Add 3 input fields and a button. When the user clicks the button, display an alert that shows the average of all 3 text fields.

b. Instead of showing a popup, have that information appear in a paragraph below the button.

c. If any of the text fields doesn't have a number, show an error message that reads "All of the inputs must be numbers"

Question Nine

a. Make a website with a heading at the top that reads "Check Middle Number Sum". Add 3 input fields and a button. When the user clicks the button, display an alert that shows whether the number in the middle input field is equal to the sum of the left input field and the right input field.

Sample input: 4, 14, 10
Sample output: true

Sample input: 4,9,8
Sample output: false

b. Instead of showing a popup, have that information appear in a paragraph below the button.

c. Have the uppercased overwrite the text that was there before.

Question Ten

a. Make a website with a heading at the top that reads "Disemvoweler". Add 1 input field, a checkbox and a button. When the user clicks the button, display an alert that shows the text in the input field with the vowels removed. If the checkbox is checked, count y as a vowel.

b. Instead of showing a popup, have that information appear in a paragraph below the button.

c. Have the uppercased overwrite the text that was there before.

About


Languages

Language:HTML 100.0%