1. Trang chủ
  2. » Mẫu Slide

Lecture Web technologies and programming – Lecture 10: HTML forms - TRƯỜNG CÁN BỘ QUẢN LÝ GIÁO DỤC THÀNH PHỐ HỒ CHÍ MINH

20 6 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 20
Dung lượng 1,05 MB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

browser uses to send the form's data to the server for processing; Either POST or GET. • name – name of the form[r]

Trang 1

1

Trang 2

2

Trang 3

3

Trang 4

Creating tables in HTML

Table attributes

Page lay-out using tables

Trang 5

HTML FORMS

HTML FORM elements

5

Trang 6

HTML forms are used to collect user

input

HTML forms contain form elements.

Form elements are different types of input  elements, checkboxes, radio buttons, submit  buttons, and more

6

Trang 7

The <form> element defines an HTML form:

• <form>

form elements

</form>

7

Trang 8

Forms provide a means of submitting

information from the client to the server

HTML supports tags for creating forms , however, it does not process the information

Use server-side script to process form information

Server-side script runs on the Web server and receives data from a form and uses it to perform a set of tasks

8

Trang 9

how a Web page 

form interacts 

with a CGI script. 

9

Trang 10

<form> tag is used to start a form

</form> tag is used to end a form

Between <form> and </form>, form

elements are placed

<form attributes>

form elements and layout tags

</form>

different

forms, but you cannot nest one form inside another

10

Trang 11

Common Form Attributes:

action - gives the URL of the application that is to receive and process the forms data

method - sets the HTTP method that the browser uses to send the form's data to the server for processing; Either POST or GET

name – name of the form

11

Trang 12

When to Use GET?

You can use GET (the default method):

If the form submission is passive (like a 

search engine query), and without 

sensitive information.

When you use GET, the form data will be 

visible in the page address.

12

Trang 13

When to Use POST?

If the form is updating data, or includes 

sensitive information (password).

POST offers better security because the 

submitted data is not visible in the page  address.

13

Trang 14

GET

dealing with sensitive data

retrieve data

14

Trang 15

POST

resource

history

Trang 16

Textbox

Password Field

Hidden Field

Checkbox

Radio Button

Text Area

Select List

Submit Button

Reset Button

16

Trang 17

<INPUT TYPE=“TEXT” >

VALUE

MAXLENGTH

<INPUT TYPE=“TEXT” NAME=NAME SIZE=30 VALUE=“ALI” MAXLENGTH=15>

17

Trang 18

<input type="submit"> defines a button 

for submitting a form to a form-handler.

a script for processing input data.

18

Trang 19

Start of the form

Trang 20

box

value

Ngày đăng: 01/04/2021, 16:08

TÀI LIỆU CÙNG NGƯỜI DÙNG

TÀI LIỆU LIÊN QUAN

🧩 Sản phẩm bạn có thể quan tâm

w