星期六, 十一月 26, 2011

Lab 31 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?

32 意見:

游鈞元 提到...

9826110游鈞元

阿嗚 提到...

電子三甲9826118王栩瑩

博揚 提到...

電子三丙 9826370 侯博揚

小企鵝 提到...

9826266 電子三乙 翁國瑋

小曼 提到...

9826104 電子三甲 張琦恩

一直捏 提到...

電子三丙 9826319 馮鈞雅

小寧 提到...

電子三丙 9826336 劉子寧

昱均 提到...

9726355 郭昱均

洪君翰 提到...

9826242洪君翰

粘丞勛 提到...

電子三乙9826248粘丞勛

張陞豪 提到...

電子三丙 9826329 張陞豪

米奇 提到...

黃敏綺 9826140 電子三甲

s9826151 提到...

電子三甲 黃智婉9826151

周許斌 提到...

電子四丙 9726316 周許斌

盧毅 提到...
作者已經移除這則留言。
盧毅 提到...

9726326盧毅電子四丙

老G 提到...

電子四甲 9726127 周昱澄

陳冠廷 提到...

9726343陳冠廷

教學 提到...

9726314吳孟剛

蔣岳霖 提到...

蔣岳霖9726309電子四丙

張育苔 提到...

電子四甲 9726141 張育苔

阿軍 提到...

電子四丙9726353蔡岳軍

料結語 提到...

9726219 電子四乙 廖婕宇

陳宥銘 提到...

電子四乙9726235陳宥銘

黃騰弘 提到...

電子三甲9826152黃騰弘

張地瓜 提到...

9726201 電子四乙 張涵絜

楊凱勻 提到...

電子四甲9726145楊凱勻

鹿其安 提到...

9726106陳麒安

宜真 提到...

9826212電子三乙

提到...

9726311電子四丙劉晏辰

郭阿德 提到...

9726313郭冠德

傅狗剛 提到...

電子四乙9726237 傅國剛