0% found this document useful (0 votes)
13 views

HTML Js

The document contains instructions for 9 HTML and JavaScript practical exercises. The exercises include: 1) Outputting name, last name, and age variables to the screen. 2) Adding two integer variables and outputting the result. 3) Using a conditional to check if a variable is less than 100. 4) Using multiple conditionals. 5) Inserting text into paragraphs with IDs. 6) Outputting an array to the screen. 7) Outputting an object's properties to the screen. 8) Calling a function. 9) Adding text to an element on button click.

Uploaded by

kara2322
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views

HTML Js

The document contains instructions for 9 HTML and JavaScript practical exercises. The exercises include: 1) Outputting name, last name, and age variables to the screen. 2) Adding two integer variables and outputting the result. 3) Using a conditional to check if a variable is less than 100. 4) Using multiple conditionals. 5) Inserting text into paragraphs with IDs. 6) Outputting an array to the screen. 7) Outputting an object's properties to the screen. 8) Calling a function. 9) Adding text to an element on button click.

Uploaded by

kara2322
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

HTML Practical JS

10-24-12

Follow the directions. Create a new file for EACH question. Name the files for the question numbers (1.html, 2.html, 3.html, etc.). Due: 10-29-12. 1. Create three variables: one for your first name, last name, and age. Output those variables to the screen. 2. Create two variables, both holding integer values. Create a third variable that adds the first two together. Output the result to the screen. 3. Create two variables with integer values. Write a conditional statement that checks to see if the first variable is less than 100. If it is, then output the word true to the screen. If it isnt, output the word false to the screen. 4. Create two variables with integer values. Write a conditional statement that checks to see if the first variable is less than 100. Then, check to see if the variable is greater than 100. If the first condition is true then output the word first to the screen. If the second condition is true then output the word second to the screen. If neither are true then output the word neither to the screen. 5. Write three paragraph tags. Give each a unique id attribute. Select each by its id and use the innerHTML method to insert some text into those paragraphs. 6. Write an array. Fill that array with your first name, last name, age, and degree emphasis. Use a for loop to output the array to the screen. 7. Write an object. Name it after yourself (no spaces). Populate it with at least 5 properties that describe yourself. Output these properties to the screen. 8. Write a function that outputs some text to the screen. Run that function. 9. Write an HTML button. Write a paragraph tag with an id attribute. Write an even handler that inserts some text into the paragraph when the button is clicked.

You might also like