Assignment10
Due: 4/16, Thursday.
1. Matching the following functions with javascript keywords: (ref: Java Script Summary )
1. Allow you to create an exception
2. Allow you to test a block
3. loop through the elements
4. general loop
5. break the loop and continue executing the code after the loop
6. break the current loop and continue with the next value
7. popup box which allows users to input a value
a. for
b. while
c. if
d. throw
e. for ... in
f. try
g. continue
h. break
i. alert
j. prompt
k. confirm
2. What's the output for the following JavaScript?
<script>
var i=0
for (i=0;i<=4;i++)
{
if (i==3){break}
document.write("The number is " + i)
document.write("<br />")
}
</script>
Assignment9
Due: 4/9, Thursday.
Design JavaScript using if-else statement: (check reference and example here.)
If the system time is less than 12, the html file shows "Good Morning!"; if it is between 12:00pm to 9:00pm, the file shows "Good Afternoon!"; otherwise, the file shows "Good Evening!".
Assignment8
Due: 4/2, Thursday.
Do some research online about Javascript. Answer the following questions:
1. What is JavaScript?
2. How to embed JavaScript into a HTML file?
Assignment7
Due: 3/26, Thursday.
1. Write the code in CSS file to define the body with background-color to be yellow, and text-align to be center.
2. Two classes are defined in CSS file as follows:
p.right {text-align:right}
p.center {text-align:center}
In corresponding HTML, apply these classes to set a paragraph to be aligned right, and another to be aligned center, as shown in following picture.
This is aligned right.
This is aligned center.
Bonus Assignment
Due: 3/19, Tuesday.
Do some research about CSS (Cascading Style Sheets), and answer the following questions:
1. What is CSS?
2. List 3 parts of CSS syntax.
3. List 3 Methods to to insert a Style Sheet.
Reference: http://www.w3schools.com/css/css_intro.asp
Assignment6
Due: 2/19, Thursday, in class.
Use the class note as reference and create a html file named a6.html to show the following text:
Red Blue Green
Upload the file to the ripway account, or email Dr. Jiang your source code.
Assignment5
Due: 2/12, Thursday, in class.
Use the class note as reference and
1. Create a html file named a5frame.html, which have 3 frames: top part 30% is yahoo website (http://www.yahoo.com/); bottom left 50% is google website (http://www.google.com/); bottom right 50% is your a4.html. (more reference here)
2. Create a html file named a5table.html to show the following content: (more reference here)
Student Name
Alex
Bob
Grade
90
85
3. Create a html file named a5list.html to show the following content: (more reference here)
Step 1.
Step 2.
step 2.1
step 2.2
Upload the above 3 files to the ripway account, or email Dr. Jiang your source code.
Assignment4
Due: 2/5, Thursday, in class.
Use the class note as reference and
Create a html file named a4.html:
1. insert a image with width 200 and height 300; (more reference here)
2. insert a background image; (more reference here)
3. edit a paragraph with font color blue and size 20. (more reference here)
Upload a4.html to the ripway account, and email Dr. Jiang your source code.
Assignment3
Due: 1/29, Thursday, in class.
Use the first 2 tables in the class note as reference;
Create a html file named a3.html using all tages in the first two tables, upload a3.html to the ripway account, and email Dr. Jiang your source code.
Assignment2 (Create your own website)
Due: 1/20, Tuesday, in class. (Due day is extended to 1/22.)
1. Check the class note;
2. Create an account on www.ripway.com,
3. Upload abcd.html (from assignment1) to the account, and change the file name to be index.html.
4. Email Dr. Jiang your website address.
Assignment1
Due: 1/15, Thursday, in class.
Do some research online and answer the following questions and give references:
1. What is multimedia?
2. What is HTML?
3. Go to yahoo website (http://www.yahoo.com/), check the source code and save it as a local file named "abc.html"; find out the first word shown in the webpage, and change the word to your name; save the modified html file as "abcd.html". Email file "abc.html" and "abcd.html" as attachements to Dr. Jiang.