星期一, 11月 08, 2010

Lab 28 Lab Form and Action

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


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


"logic will get you from A to B - imagination will take you anywhere"

How to use Form to invoke a remote service through CGI.

1. Copy the search box of this search page,
inlcuding radio buttons, text input, and submit button.
2. Open your KompoZer HTML editor.
3. Open a new empty HTML file.
4. Paste the search box into this new file.

5. Use KompoZer to add a Form to this search box. Do not hand code the HTML. Just fill the blank in the Form dialog.

6. In the form dialog, set Action="http://google.com/search" and name of Form as "f" and method as "get"
(See Hint if it does not work.)
7. Save your file on your computer. Run your HTML by Firefox. What do you get?

8. Set method as "post"
9. Run your HTML by Firefox. What do you get?

21 則留言:

家駿 提到...

9726215 電子三乙 邱家駿

沈建志 提到...

電子四甲 9626101 沈建志

廖振宇 提到...

9726126廖振宇電子三甲

WHY 提到...

電子四丙9626331范朕槐

匿名 提到...

電子四丙9626349余時中

9626242 提到...

電子四乙 9626242 黃涴徽

企鵝 提到...

9726112 電子三甲 潘俊銘

施博鐘 提到...

9626250 電子四乙 施博鐘

Chin-Hao Chen 提到...

S9626121電子四甲陳勁豪

陳家翰 提到...

9626350 電子四丙 陳家翰

國慶 提到...

9726248 電子三乙 楊國慶

蘇子瀚 提到...

電子四甲 蘇子瀚 9626110

li3vul3 提到...

電子四丙 9626302 王竣右

s9726301 提到...

9726301 電子三丙 唐瑋璐

匿名 提到...

9626209 電子四乙 李承寰

9726302 提到...

9726302電子三丙吳孟學

鄒廣淳 提到...

9612222 電子三甲 鄒廣淳

Hello40 提到...

<a href="http://helloworld40.blogspot.com/2010/11/lab-28-lab-form-電子四乙 9626240 林庚諭</a>

李健祥 提到...

電子三甲9726149李健祥

Hello40 提到...

電子四乙 9626240 林庚諭

瑋雁 提到...

9726218 電子三乙 徐瑋雁