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 single document, but forms cannot be nested....
q=Multimedia
Simple Form Search:
The INPUT Tag <INPUT TYPE = TYPE must be one of: –"text" –"password" –"checkbox" –"radio” –”submit" –”reset” –“button” –“hidden”
The SELECT Tag Inside..., any number of SELECT tags are allowed First option. Second option.
The TEXTAREA Tag Default contents go here.
Other INPUT Attributes <INPUT –NAME –VALUE –CHECKED –SIZE –MAXLENGTH
Forms URL for a popular search engine – Client request – ? p=java
Search Search:
Mapquest Query StringQuery String country=US&address=411+OAK+ST&city =WAUKEGAN&state=IL&zipcode=60085
MapQuest Query String country=US& address=411+OAK+ST& city=WAUKEGAN& state=IL& zipcode=60085
MapQuest Form country: address: city: state: zipcode:
The objects in the form
Forms & Client Side Processing function dice(form){ form.die1.value = Math.floor(Math.random()*6+1) } Dice:
A Simple Function function compute(form) { form.result.value = eval(form.expr.value) } Enter an expression: Result:
expr Result
expr Result function compute(form) { form.result.value = eval(form.expr.value) }