2009-04-23
HTML vol.11
- 実際にフォームを書いてみる。
GETパラメータ
| URL | name | value | |||
|---|---|---|---|---|---|
| http://www.google.co.jp/search? | q | = | abc | & | ..... |
| get | URLに値を表示して送信する |
| post | URLに値を表示しないで送信する |
- getには送信できる容量に限界がある
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja"> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> <title>Google Search</title> </head> <body> <form method="get" action="http://www.google.co.jp/search" accept-charset="utf-8"> <input type="hidden" name="oe" value="UTF-8" /> <ul> <li><input type="text" name="q" /></li> <li><label>en<input type="radio" name="lr" value="" /></label> <label>ja<input type="radio" name="lr" value="lang_ja" checked="checked" /></label></li> <li><label><input type="checkbox" name="q" value="猫" checked="checked" />always nuko</label></li> <li><input type="submit" value="search→" /></li> </ul> </form> </body> </html>
Copyright © crazyup. All rights reserved.


