HTML - Submit Buttons
Submission buttons are a type of <input /> tag. Set the type attribute to submit. This creates a special type of button in your forms that will perfom the form's set action. We learned about the action attribute in our HTML Forms lesson.HTML Code:
<input type="submit" value="Submit" /><br /> <input type="submit" value="Send" /><br /> <input type="submit" value="Submit Form" /><br />
Submit Buttons:
Form Submission - Action
For a submission button to accomplish anything it must be placed inside of a form tag with an action and a method. The action is always set to a server side scripting file such as a PHP, PERL, or ASP file. Another choice may be to set the action to mailto followed by an email address, and the form will be emailed to the specified address.Mailto has been depreciated, however for the purpose of this example and to get a feel for form submission, it will work great in our example.
HTML Code:
<form method="post" action="mailto:youremail@youremail.com" >
First:<input type="text" name="First" size="12 maxlength="12" />
Last:<input type="text" name="Last" size="24" maxlength="24" />
<input type="submit" value="Send Email" />
</form>
0 comments:
Post a Comment