基礎プログラミング II 第 8 回 (CGI ことはじめ) 「基本の CGI ホームページの作りかた」 講義ノート目次

HTML の基本

入力を促す CGI ホームページの作りかた

それでは、cgi_ticket.html を作ってみよう。


<html>
<head>
   <title>
   オンライン券売機
   </title>
</head>
<body>
<form method="POST" action="./cgi_ticket.rb">
<ul>
<li>出発駅: 酒田</li>
<li>到着駅: 
     <select name="arrival">
			    <option> 東酒田
			    <option> 砂越
			    <option> 北余目
			    <option> 余目
			    <option> 北余目
			    <option> 西袋
			    <option> 藤島
			    <option> 鶴岡
     </select> 
</li>
</ul>
<p>
<input type="submit" value="OK">
<input type="reset" value="clear">
</p>
</form>
</body>
</html>

自分のホームの下の ˜/public_html/rubycgi の cgi_ticket.html を開けてみる。

select tag の例

と見えたなら、できあがり。動作の解説 に進もう。