Download presentation
Presentation is loading. Please wait.
Published byJasmin McCoy Modified over 9 years ago
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
Simple Form Search:
5
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.
6
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
7
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
8
The INPUT Tag <INPUT TYPE = TYPE must be one of: –"text" –"password" –"checkbox" –"radio” –”submit" –”reset” –“button” –“hidden”
9
The SELECT Tag Inside..., any number of SELECT tags are allowed First option. Second option.
10
The TEXTAREA Tag Default contents go here.
11
Other INPUT Attributes <INPUT –NAME –VALUE –CHECKED –SIZE –MAXLENGTH
12
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
13
Search Search:
14
Javascript Objects Name: e-Mail: My homepage
16
The objects in the form
18
Forms & Client Side Processing function dice(form){ form.die1.value = Math.floor(Math.random()*6+1) } Dice:
Similar presentations
© 2025 SlidePlayer.com Inc.
All rights reserved.