HTML and CSS Reference
In-Depth Information
declared in the document head or a linked external file can be used by the onclick event
handler on the input element as follows:
<form>
<select id="langsel">
<option value="http://www.example.com" selected="selected">English</option>
<option value="http://de.example.com">Deutsch</option>
<option value="http://fr.example.com">Français</option>
<option value="http://es.example.com">Español</option>
<option value="http://ja.example.com"> 本語 </option>
</select>
<input type="button" value="Go!" onclick="goto_URL(this.form.langsel);" />
</form>
5.
Note that other methods can also be applied such as server-side redirection, which
eliminates the need for JavaScript.
Forms
Basic forms can be created with the following steps:
1.
Create an empty form.
<form>
</form>
2.
Specify the location of the server-side script used to process data from the form.
<form action="register.php" >
</form>
3.
Specify the method to be used for sending data. The form data can be sent as URL
variables ( method="get" ) or as an HTTP post ( method="post" ).
The get method appends the form data to the URL as name-value pairs, which makes it
possible to bookmark the result of the form submission. Because of the length limitations
of URLs, however, it cannot be ensured that all form data will be transferred. Moreover,
the get method is inadequate for transforming sensitive information such as passwords,
because the data will be visible in the address bar of the browser.
The post method sends the form data as an HTTP post transaction. This method has no
size limitations and is more secure than the get method.
<form method="post" action="register.php">
</form>
 
Search WWH ::




Custom Search