Lập trình và Thiếtkế Web 1 – Bài 5 : Form © 2007 Khoa CNTT - ĐHKHTN C C á á c c th th à à nh nh ph ph ầ ầ n n c c ủ ủ a a Form Form – – Text Field Text Field Dùng để nhậpmột dòng vănbản Cú pháp <INPUT TYPE = “TEXT” NAME = string READONLY SIZE = variant MAXLENGTH = long TABINDEX = integer VALUE = string ………… > Ví dụ <input type=“text” name=“txtName” value=“This is one line text with 301” size=“20” maxlength=“30”> t with 301 20 30 Lập trình và Thiếtkế Web 1 – Bài 5 : Form © 2007 Khoa CNTT - ĐHKHTN C C á á c c th th à à nh nh ph ph ầ ầ n n c c ủ ủ a a Form Form – – Password Field Password Field Dùng để nhậpmậtkhẩu Cú pháp <INPUT TYPE = “PASSWORD” NAME = string READONLY SIZE = variant MAXLENGTH = long TABINDEX = integer VALUE = string ………… > Ví dụ <input type=“Password” name=“txtPassword” value=“123456abc1234” size=“20” maxlength=“30”> Lập trình và Thiếtkế Web 1 – Bài 5 : Form © 2007 Khoa CNTT - ĐHKHTN C C á á c c th th à à nh nh ph ph ầ ầ n n c c ủ ủ a a Form Form – – Check box Check box Cú pháp <input TYPE = “checkbox” NAME = “text” VALUE = “text” [checked] > Ví dụ <html> <body> Check box group : <br> Anh van: <input type="checkbox" name="Languages1" value="En"><br> Hoa: <input type="checkbox" name="Languages2" value="Chz" checked><br> Nhut: <input type="checkbox" name="Languages3" value="Jp"><br> </body> </html> Lập trình và Thiếtkế Web 1 – Bài 5 : Form © 2007 Khoa CNTT - ĐHKHTN C C á á c c th th à à nh nh ph ph ầ ầ n n c c ủ ủ a a Form Form – – Radio button Radio button Cú pháp <input TYPE = “radio” NAME = “text” VALUE = “text” [checked] > Ví dụ <html> <body> Radio Button Group : <br> Nam: <input type="radio" name="sex" value="nam" checked><br> Nu: <input type="radio" name="sex" value="nu“checked ><br> </body> </html> <html> <body> Radio Button Group : <br> Nam: <input type="radio" name="sex1" value="nam" checked><br> Nu: <input type="radio" name="sex2" value="nu“checked ><br> </body> </html> Lập trình và Thiếtkế Web 1 – Bài 5 : Form © 2007 Khoa CNTT - ĐHKHTN C C á á c c th th à à nh nh ph ph ầ ầ n n c c ủ ủ a a Form Form – – File Form Control File Form Control Dùng để upload 1 file lên server Cú pháp <form action=“…” method=“post” enctype=“multipart/form-data” name=“ ”> <input TYPE=“FILE” NAME=“…”> </form> Ví dụ <html> <body> <form name=“frmMain” action=“POST” enctype=“multipart/form-data”> <input type="file" name="fileUpload"> </form> </body> </html> . Lập trình và Thiếtkế Web 1 – Bài 5 : Form © 2007 Khoa CNTT - ĐHKHTN C C á á c c th th à à nh nh ph ph ầ ầ n n c c ủ ủ a a Form. value=“This is one line text with 301” size=“20” maxlength=“30”> t with 301 20 30 Lập trình và Thiếtkế Web 1 – Bài 5 : Form © 2007 Khoa CNTT - ĐHKHTN C C á á c c th th à à nh nh ph ph ầ ầ n n c c ủ ủ a a Form. type=“Password” name=“txtPassword” value=“123456abc1234” size=“20” maxlength=“30”> Lập trình và Thiếtkế Web 1 – Bài 5 : Form © 2007 Khoa CNTT - ĐHKHTN C C á á c c th th à à nh nh ph ph ầ ầ n n c c ủ ủ a a Form