JavaScript Tutorial/Form/Element Type
Get the element type
<source lang="javascript">
<html> <head> <title>Online Survey</title> <script type="text/javascript" language="javascript">
</script> </head> <body> <form action="http://www.wbex.ru" method="POST" name="MyForm">
Online Survey |
||
---|---|---|
Your Name: | <input type="text" name="YourName"/> | |
Your Gender: |
<input type="radio" name="Gender" value="Male"/>Male |
|
Which of our consultancy services are you interested in? |
<input type="checkbox" name="XML"/> XML |
|
Which free gift would you prefer for filling out this survey? |
<select name="FreeGift"> <option value="Choice1">Choice 1</option> <option value="Choice2">Choice 2</option> <option value="Choice3">Choice 3</option> </select> | |
Enter your comments in the text box |
<textarea name="Comments" rows="5" cols="50"></textarea> | |
<input type="submit" value="Send Form" onclick="CheckCheckboxes()"/> |
</form> </body> </html></source>