A Searching Example
We'll start off with a simple example of a form that contains one input field and a button
to submit a search query, not unlike the one used by Google. This example doesn't use any
styles; you just need to create a file called index.htm that contains the following code:
<form name="search" action="search">
<input type="text" name="searchBox">
This form has a name attribute of " search " and contains two controls: an input field where
a user can enter a search phrase and a button to submit the form. The form can also be sub-
mitted by pressing Enter .
The " action " attribute is the URL that the form will be submitted to so that it can be pro-
cessed on the server side. The input field also has a " name " attribute of " searchBox " that
is used to access the information inside it.
the same directory as index.htm.
Search WWH ::