2013年10月17日 星期四

Request a server to do an action

  • Dynamic pages, content generated by server-side programs.
  • CGI, Common Gateway Interface, for sending requests to server-side programs.

Server

static page
Ex:
http://www.google.com/

dynamic page
Ex:
http://www.cna.com.tw/

URL that sends a request by CGI
Ex:
http://maps.google.com/maps?q=24.9586,+121.2411

Browser

HTML Form

Form examples

text field
check box
radio button

2013年10月14日 星期一

Homework 10-14-2013 (HW3)

產生三個文字方塊,上面各寫1, 2, 3
這三個方塊上方可以顯現照片
當滑鼠置於文字1的時候,顯示照片A
當滑鼠置於文字2的時候,顯示照片B
當滑鼠置於文字3的時候,顯示照片C

Due 10-21-2013 6:30 pm

Lab 12 Change an image by moving the mouse

1. Design a webpage to display picture A initially.
2. Try to move the mouse. When the mouse is not within the area of the picture, picture A remains the same. When the mouse is within the area of the picture, display picture B in place.

You can use the photo in http://minstral.blogspot.tw/2013/06/blog-post.html for picture A
 and the photo in http://minstral.blogspot.tw/2013/05/blog-post_30.html for picture B.

Hint: You may find the example useful.
Hint: If you have a problem displaying a picture on the browser, you can check out the example.

Lab 11 九九乘法表

1. Open notepad++
2. Based on the code as in

http://www.scottandrew.com/weblog/articles/dom_4 ,
write a code to generate the table of 9*9 products. (九九乘法表)

Hint: The javascript code should be enclosed by script tags.

Lab 10 Create Image using DOM

1. Open notepad++
2. Hand code a javascript that loads an image from Internet based on
the DOM model.
3. Take a look at the sample code that shows how window.onload to load the image.
4. Use a button to load the image. Try how onclick works.