表單 (Form)
… Ex. …
method method="get" URL: HTTP message entity: none 不可超過 256 個字元 method="post" URL: HTTP message entity: uid=ycc&pwd=mypwd
Form Example text password textarea checkbox radio select file submit, reset, button
Ex. User Name:
Ex. Password:
… … ex. Comments:
ex. Members: Yahoo! Google Youtube
ex. Payment: Visa Master JCB
… … Ex. Year:
… … Ex. Web Technologies: HTML XHTML CSS JavaScript ASP PHP
… A B AB O JavaScript VBScript PHP ASP.NET
ex. Upload pdf file: size="…" maxlength="…"
POST /ycchen/www2011/ex/join.php HTTP/1.1 Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */* Referer: Accept-Language: zh-tw,zh-cn;q=0.5 Content-Type: multipart/form-data; boundary= d934db UA-CPU: x86 Accept-Encoding: gzip, deflate User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; GTB5;.NET CLR ;.NET CLR ; InfoPath.1) Host: Content-Length: Connection: Keep-Alive Cache-Control: no-cache d934db Content-Disposition: form-data; name="uid" Your id d934db Content-Disposition: form-data; name="pwd" mypwd d934db Content-Disposition: form-data; name="google" google
d934db Content-Disposition: form-data; name="wts" HTML d934db Content-Disposition: form-data; name="wts" XHTML d934db Content-Disposition: form-data; name="pdf"; filename="C:\paper\IEEEMembershipApp.pdf" Content-Type: application/pdf %PDF-1.3 % obj << /Linearized 1 /O 37 /H [ ] /L /E /N 3 /T
ex.
ex.
… ex. Reset
… 填入個人資料 姓名 : 電子信箱 : 電話 : ex7-4.html
Male Female Male Female
What's New in HTML5 Forms Elements ,, Input Types color, date, datetime, datetime-local, , month, number, range, search, tel, time, url, week colordatedatetime month numberrangetime Input Attributes autocomplete, autofocus, form, formaction, formenctype, formmethod, formnovalidate, formtarget, height, width, list, min, max, multiple, pattern(regexp), placeholder, required, step autocompleteautofocusformformaction formmethodlistmin, maxpattern(regexp)placeholderrequiredstep