Presentation is loading. Please wait.

Presentation is loading. Please wait.

HTML - Forms By Joaquin Vila, Ph.D.. Form Tag The FORM tag specifies a fill-out form within an HTML document. More than one fill-out form can be in a.

Similar presentations


Presentation on theme: "HTML - Forms By Joaquin Vila, Ph.D.. Form Tag The FORM tag specifies a fill-out form within an HTML document. More than one fill-out form can be in a."— Presentation transcript:

1 HTML - Forms By Joaquin Vila, Ph.D.

2 Form Tag The FORM tag specifies a fill-out form within an HTML document. More than one fill-out form can be in a single document, but forms cannot be nested....

3 Form Tag Attributes ACTION is the URL of the query server to which the form contents will be submitted. METHOD is the HTTP method used to submit the fill-out form to a query server. –The valid choices are: GET -- this is the default method POST -- this method causes the fill-out form contents to be sent to the server in a data body rather than as part of the URL.

4 Get Method Method = GET When the submit button is pressed, the contents of the form will be assembled into a query URL that looks like this: –action?name=value&name=value&name=value

5 Post Method Method = POST The contents of the form are encoded exactly as with the GET method, but rather than appending them to the URL specified by the form's ACTION attribute as a query, the contents are sent in a data block as part of the POST operation. name=value&name=value&name=value

6 The INPUT Tag <INPUT TYPE = TYPE must be one of: –"text" –"password" –"checkbox" –"radio” –”submit" –”reset” –“button” –“hidden”

7 The SELECT Tag Inside..., any number of SELECT tags are allowed First option. Second option.

8 The TEXTAREA Tag Default contents go here.

9 Other INPUT Attributes <INPUT –NAME –VALUE –CHECKED –SIZE –MAXLENGTH

10 Forms URL for a popular search engine –http://www.yahoo.com/ Client request –http://search.yahoo.com/bin/search?p=java http://search.yahoo.com/bin/search ? p=java

11 FORM Search Search:

12 Forms & JavaScript function dice(form){ form.die1.value = Math.floor(Math.random()*6+1) } Dice:


Download ppt "HTML - Forms By Joaquin Vila, Ph.D.. Form Tag The FORM tag specifies a fill-out form within an HTML document. More than one fill-out form can be in a."

Similar presentations


Ads by Google