<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
		<id>http://wbex.ru/index.php?action=history&amp;feed=atom&amp;title=JavaScript_Tutorial%2FForm%2FForm_Object</id>
		<title>JavaScript Tutorial/Form/Form Object - История изменений</title>
		<link rel="self" type="application/atom+xml" href="http://wbex.ru/index.php?action=history&amp;feed=atom&amp;title=JavaScript_Tutorial%2FForm%2FForm_Object"/>
		<link rel="alternate" type="text/html" href="http://wbex.ru/index.php?title=JavaScript_Tutorial/Form/Form_Object&amp;action=history"/>
		<updated>2026-04-04T11:34:05Z</updated>
		<subtitle>История изменений этой страницы в вики</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>http://wbex.ru/index.php?title=JavaScript_Tutorial/Form/Form_Object&amp;diff=9147&amp;oldid=prev</id>
		<title>Admin: 1 версия</title>
		<link rel="alternate" type="text/html" href="http://wbex.ru/index.php?title=JavaScript_Tutorial/Form/Form_Object&amp;diff=9147&amp;oldid=prev"/>
				<updated>2010-05-26T08:24:50Z</updated>
		
		<summary type="html">&lt;p&gt;1 версия&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;ru&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Предыдущая&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Версия 08:24, 26 мая 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; style=&quot;text-align: center;&quot; lang=&quot;ru&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(нет различий)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	<entry>
		<id>http://wbex.ru/index.php?title=JavaScript_Tutorial/Form/Form_Object&amp;diff=9146&amp;oldid=prev</id>
		<title> в 18:52, 25 мая 2010</title>
		<link rel="alternate" type="text/html" href="http://wbex.ru/index.php?title=JavaScript_Tutorial/Form/Form_Object&amp;diff=9146&amp;oldid=prev"/>
				<updated>2010-05-25T18:52:56Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Form==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The Form object represents an HTML property created by the &amp;lt;form&amp;gt; tag.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The Form object can be used to access all the properties of the specified form.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Forms can be referenced by either the forms array or directly by name.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Form methods and properties.&amp;lt;/p&amp;gt;&lt;br /&gt;
Property/Method&lt;br /&gt;
Description&lt;br /&gt;
action&lt;br /&gt;
HTML ACTION attribute of Form object&lt;br /&gt;
elements&lt;br /&gt;
Array reflecting elements within form&lt;br /&gt;
elements.length&lt;br /&gt;
Length of elements array&lt;br /&gt;
encoding&lt;br /&gt;
HTML ENCTYPE attribute of Form object&lt;br /&gt;
handleEvent()&lt;br /&gt;
Handles specific event&lt;br /&gt;
length&lt;br /&gt;
Number of elements within form&lt;br /&gt;
method&lt;br /&gt;
HTML METHOD attribute of Form object&lt;br /&gt;
name&lt;br /&gt;
HTML NAME attribute of Form object&lt;br /&gt;
onReset&lt;br /&gt;
Event handler for Reset button&lt;br /&gt;
onSubmit&lt;br /&gt;
Event handler for Submit button&lt;br /&gt;
reset()&lt;br /&gt;
Resets form elements&lt;br /&gt;
submit()&lt;br /&gt;
Submit for data&lt;br /&gt;
target&lt;br /&gt;
HTML TARGET attribute of Form object&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
    &amp;lt;head&amp;gt;&lt;br /&gt;
    &amp;lt;title&amp;gt; Using the name property to access a form object&amp;lt;/title&amp;gt;&lt;br /&gt;
    &amp;lt;/head&amp;gt;&lt;br /&gt;
    &amp;lt;body&amp;gt;&lt;br /&gt;
    &amp;lt;script language = &amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;!--&lt;br /&gt;
    function checkName(){&lt;br /&gt;
         var firstName = document.formEx.first.value;&lt;br /&gt;
         var lastName = document.formEx.last.value;&lt;br /&gt;
         alert(&amp;quot;The name you entered is: &amp;quot; + firstName + &amp;quot; &amp;quot; + lastName);&lt;br /&gt;
    }&lt;br /&gt;
    --&amp;gt;&lt;br /&gt;
    &amp;lt;/script&amp;gt;&lt;br /&gt;
    &amp;lt;form name=&amp;quot;formEx&amp;quot;&amp;gt;&lt;br /&gt;
    First Name:&lt;br /&gt;
    &amp;lt;input type=&amp;quot;text&amp;quot; name=&amp;quot;first&amp;quot; size=&amp;quot;20&amp;quot;&amp;gt;&lt;br /&gt;
    Last Name:&lt;br /&gt;
    &amp;lt;input type=&amp;quot;text&amp;quot; name=&amp;quot;last&amp;quot; size=&amp;quot;25&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
    Click the button to check that the information is correct.&lt;br /&gt;
    &amp;lt;br&amp;gt;&lt;br /&gt;
    &amp;lt;input type=&amp;quot;button&amp;quot; value=&amp;quot;verify&amp;quot; name=&amp;quot;check&amp;quot; onClick=&amp;quot;checkName()&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;/form&amp;gt;&lt;br /&gt;
    &amp;lt;/body&amp;gt;&lt;br /&gt;
    &amp;lt;/html&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
== Form.action==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The action property represents the ACTION attribute of the HTML &amp;lt;form&amp;gt; tag.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;It is typically the URL to which the form is being submitted.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
    &amp;lt;head&amp;gt;&lt;br /&gt;
    &amp;lt;title&amp;gt; Using the action property of the Form object&amp;lt;/title&amp;gt;&lt;br /&gt;
    &amp;lt;/head&amp;gt;&lt;br /&gt;
    &amp;lt;body&amp;gt;&lt;br /&gt;
    &amp;lt;script language=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;!--&lt;br /&gt;
    function getAction(){&lt;br /&gt;
         var actionValue = document.form1.action;&lt;br /&gt;
         document.form1.msg.value = &amp;quot;Your form was submitted to the following URL:\n &amp;quot; + actionValue;&lt;br /&gt;
    }&lt;br /&gt;
    --&amp;gt;&lt;br /&gt;
    &amp;lt;/script&amp;gt;&lt;br /&gt;
    &amp;lt;form name=&amp;quot;form1&amp;quot; action=&amp;quot;http://www.wbex.ru/cgi-bin/process.pl&amp;quot;&amp;gt;&lt;br /&gt;
    Enter your street address:&lt;br /&gt;
    &amp;lt;input type=&amp;quot;text&amp;quot; name=&amp;quot;address&amp;quot; size=&amp;quot;40&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
    &amp;lt;input type=&amp;quot;button&amp;quot; value=&amp;quot;Submit&amp;quot;onClick=getAction()&amp;gt;&lt;br /&gt;
    &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
    &amp;lt;textarea name=&amp;quot;msg&amp;quot; rows=&amp;quot;5&amp;quot; cols=&amp;quot;62&amp;quot;&amp;gt;&amp;lt;/textarea&amp;gt;&lt;br /&gt;
    &amp;lt;/form&amp;gt;&lt;br /&gt;
    &amp;lt;/body&amp;gt;&lt;br /&gt;
    &amp;lt;/html&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
== Form.elements==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The elements property represents the elements array, which is used to access each element within a form.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The order of the form elements in the elements array is the order in which they appear in the HTML source.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
    &amp;lt;head&amp;gt;&lt;br /&gt;
    &amp;lt;title&amp;gt; Using the form elements property&amp;lt;/title&amp;gt;&lt;br /&gt;
    &amp;lt;/head&amp;gt;&lt;br /&gt;
    &amp;lt;body&amp;gt;&lt;br /&gt;
    &amp;lt;script language=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;!--&lt;br /&gt;
    function getName(){&lt;br /&gt;
         var textName = document.form1.elements[0].name;&lt;br /&gt;
         alert(&amp;quot;The textbox name is: &amp;quot; + textName);&lt;br /&gt;
    }&lt;br /&gt;
    --&amp;gt;&lt;br /&gt;
    &amp;lt;/script&amp;gt;&lt;br /&gt;
    &amp;lt;form name=&amp;quot;form1&amp;quot;&amp;gt;&lt;br /&gt;
    This is a blank input textbox. Click on the button below to get the name of the textbox.&lt;br /&gt;
    &amp;lt;br&amp;gt;&lt;br /&gt;
    &amp;lt;input type=&amp;quot;text&amp;quot; name=&amp;quot;textbox1&amp;quot; size=25&amp;gt;&lt;br /&gt;
    &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
    &amp;lt;input type=&amp;quot;button&amp;quot; value=&amp;quot;Get Name&amp;quot; onClick = getName()&amp;gt;&lt;br /&gt;
    &amp;lt;/form&amp;gt;&lt;br /&gt;
    &amp;lt;/body&amp;gt;&lt;br /&gt;
    &amp;lt;/html&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
== Form.elements.length==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The elements.length property specifies the number of items in the elements array.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Each item in the array refers to an object in the HTML form.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
    &amp;lt;head&amp;gt;&lt;br /&gt;
    &amp;lt;title&amp;gt; Using the elements.length property of the Form object&amp;lt;/title&amp;gt;&lt;br /&gt;
    &amp;lt;/head&amp;gt;&lt;br /&gt;
    &amp;lt;body&amp;gt;&lt;br /&gt;
    &amp;lt;script language=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;!--&lt;br /&gt;
    function getNum(){&lt;br /&gt;
         var numOfElements = document.form1.elements.length;&lt;br /&gt;
         alert(&amp;quot;The number of elements in this document are:&amp;quot; + numOfElements);&lt;br /&gt;
    }&lt;br /&gt;
    --&amp;gt;&lt;br /&gt;
    &amp;lt;/script&amp;gt;&lt;br /&gt;
    &amp;lt;form name=&amp;quot;form1&amp;quot;&amp;gt;&lt;br /&gt;
    Dummy text box:&lt;br /&gt;
    &amp;lt;input type=&amp;quot;text&amp;quot; name=&amp;quot;textbox1&amp;quot; size=&amp;quot;25&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;br&amp;gt;&lt;br /&gt;
    &amp;lt;input type=&amp;quot;button&amp;quot; value=&amp;quot;Dummy Button&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;input type=&amp;quot;text&amp;quot; size=&amp;quot;20&amp;quot; name=&amp;quot;Sample&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
    Click on the button to get the number of elements in this form.&lt;br /&gt;
    &amp;lt;input type=&amp;quot;button&amp;quot; value=&amp;quot;Get Elements&amp;quot; onClick=&amp;quot;getNum()&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;/form&amp;gt;&lt;br /&gt;
    &amp;lt;/body&amp;gt;&lt;br /&gt;
    &amp;lt;/html&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
== form.encoding==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The encoding property represents the type of encoding used by the form. It can be specified in the HTML &amp;lt;form&amp;gt; tag as the ENCTYPE attribute.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Setting the encoding property will override the HTML ENCTYPE attribute.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
    &amp;lt;head&amp;gt;&lt;br /&gt;
    &amp;lt;title&amp;gt; Using the encoding property for the Form object&amp;lt;/title&amp;gt;&lt;br /&gt;
    &amp;lt;/head&amp;gt;&lt;br /&gt;
    &amp;lt;body&amp;gt;&lt;br /&gt;
    &amp;lt;script language=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;!--&lt;br /&gt;
    function getEncoding(){&lt;br /&gt;
         var encodingType = document.form1.encoding;&lt;br /&gt;
         alert(encodingType);&lt;br /&gt;
    }&lt;br /&gt;
    --&amp;gt;&lt;br /&gt;
    &amp;lt;/script&amp;gt;&lt;br /&gt;
    &amp;lt;form name=&amp;quot;form1&amp;quot; action=&amp;quot;post&amp;quot; enctype=&amp;quot;application/x-www-form-urlencoded&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;input type=&amp;quot;button&amp;quot; value=&amp;quot;Get Encoding&amp;quot; onClick=&amp;quot;getEncoding()&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;/form&amp;gt;&lt;br /&gt;
    &amp;lt;/body&amp;gt;&lt;br /&gt;
    &amp;lt;/html&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
== Form.handleEvent()==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Syntax&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
form.handleEvent(event)&amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
== Form.length==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The length property represents the number of elements within a form.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;This property works the same as the elements.length property.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
    &amp;lt;head&amp;gt;&lt;br /&gt;
    &amp;lt;title&amp;gt; Using the length property of the Form object&amp;lt;/title&amp;gt;&lt;br /&gt;
    &amp;lt;/head&amp;gt;&lt;br /&gt;
    &amp;lt;body&amp;gt;&lt;br /&gt;
    &amp;lt;script language=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;!--&lt;br /&gt;
    function showNumElements(){&lt;br /&gt;
         alert(&amp;quot;There are &amp;quot; + document.form1.length + &amp;quot; elements in this document&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
    --&amp;gt;&lt;br /&gt;
    &amp;lt;/script&amp;gt;&lt;br /&gt;
    &amp;lt;form name=&amp;quot;form1&amp;quot;&amp;gt;&lt;br /&gt;
    Enter First Name:&lt;br /&gt;
    &amp;lt;input type=&amp;quot;text&amp;quot; size=15&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
    Enter Last Name:&lt;br /&gt;
    &amp;lt;input type=&amp;quot;text&amp;quot; size=20&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
    Enter address:&lt;br /&gt;
    &amp;lt;input type=&amp;quot;text&amp;quot; size=40&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
    &amp;lt;input type=&amp;quot;button&amp;quot; value=&amp;quot;Submit&amp;quot; onClick=showNumElements()&amp;gt;&lt;br /&gt;
    &amp;lt;/form&amp;gt;&lt;br /&gt;
    &amp;lt;/body&amp;gt;&lt;br /&gt;
    &amp;lt;/html&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
== Form.method==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The method property of the Form object represents the type of submission, GET or POST, being used by the form.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
    &amp;lt;head&amp;gt;&lt;br /&gt;
    &amp;lt;title&amp;gt; Using the method property of the Form object&amp;lt;/title&amp;gt;&lt;br /&gt;
    &amp;lt;/head&amp;gt;&lt;br /&gt;
    &amp;lt;body&amp;gt;&lt;br /&gt;
    &amp;lt;script language=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;!--&lt;br /&gt;
    function informMethod(){&lt;br /&gt;
        alert(&amp;quot;The form method is:&amp;quot; + document.form1.method);&lt;br /&gt;
    }&lt;br /&gt;
    --&amp;gt;&lt;br /&gt;
    &amp;lt;/script&amp;gt;&lt;br /&gt;
    &amp;lt;form name=&amp;quot;form1&amp;quot; method=&amp;quot;get&amp;quot;&amp;gt;&lt;br /&gt;
    First Name:&amp;lt;input type=text&amp;quot; name=&amp;quot;first&amp;quot; size=15&amp;gt;&lt;br /&gt;
    Last Name:&amp;lt;input type=text&amp;quot; name=&amp;quot;last&amp;quot; size=25&amp;gt;&lt;br /&gt;
    &amp;lt;br&amp;gt;&lt;br /&gt;
    City:&amp;lt;input type=text&amp;quot; name=&amp;quot;city&amp;quot; size=20&amp;gt;&lt;br /&gt;
    State:&amp;lt;input type=text&amp;quot; name=&amp;quot;state&amp;quot; size=2 maxlength=2&amp;gt;&lt;br /&gt;
    Zip:&amp;lt;input type=text&amp;quot; name=&amp;quot;zip&amp;quot; size=5 maxlength=5&amp;gt;&lt;br /&gt;
    &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
    Click the button to see what type of Method is used for submission.&lt;br /&gt;
    &amp;lt;input type=&amp;quot;button&amp;quot; value=&amp;quot;Click Here&amp;quot; onClick=&amp;quot;informMethod()&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;/form&amp;gt;&lt;br /&gt;
    &amp;lt;/body&amp;gt;&lt;br /&gt;
    &amp;lt;/html&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
== Form.name==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The name property of the Form object represents the name of the form as specified in the HTML &amp;lt;form&amp;gt; tag.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
    &amp;lt;head&amp;gt;&lt;br /&gt;
    &amp;lt;title&amp;gt;Access the name property of the Form object&amp;lt;/title&amp;gt;&lt;br /&gt;
    &amp;lt;/head&amp;gt;&lt;br /&gt;
    &amp;lt;body&amp;gt;&lt;br /&gt;
    &amp;lt;script language=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;!--&lt;br /&gt;
    function showName(){&lt;br /&gt;
        alert(&amp;quot;Form Name is: &amp;quot; + document.form1.name);&lt;br /&gt;
    }&lt;br /&gt;
    --&amp;gt;&lt;br /&gt;
    &amp;lt;/script&amp;gt;&lt;br /&gt;
    &amp;lt;form name =&amp;quot;form1&amp;quot; &amp;gt;&lt;br /&gt;
    Dummy input text box.&lt;br /&gt;
    &amp;lt;input type= &amp;quot;text&amp;quot; size=&amp;quot;15&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
    Click on the button to get the name of the form&lt;br /&gt;
    &amp;lt;input type=&amp;quot;button&amp;quot; value=&amp;quot;click me&amp;quot; onclick=&amp;quot;showName()&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;/form&amp;gt;&lt;br /&gt;
    &amp;lt;/body&amp;gt;&lt;br /&gt;
    &amp;lt;/html&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
== Form.onReset==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Syntax&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
onReset=&amp;quot;command&amp;quot;&amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
== Form.onSubmit==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Syntax&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
onSubmit=&amp;quot;command&amp;quot;&amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
== Form.reset()==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The reset method resets all the form elements to their default values.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;It operates the same as a mouse click on a Reset button for the calling form.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
    &amp;lt;head&amp;gt;&lt;br /&gt;
    &amp;lt;title&amp;gt; Using the reset method of the Form object&amp;lt;/title&amp;gt;&lt;br /&gt;
    &amp;lt;/head&amp;gt;&lt;br /&gt;
    &amp;lt;body&amp;gt;&lt;br /&gt;
    &amp;lt;script language=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;!--&lt;br /&gt;
    function resetForm(form){&lt;br /&gt;
         document.form1.reset(form);&lt;br /&gt;
    }&lt;br /&gt;
    --&amp;gt;&lt;br /&gt;
    &amp;lt;/script&amp;gt;&lt;br /&gt;
    &amp;lt;form name=&amp;quot;form1&amp;quot;&amp;gt;&lt;br /&gt;
    Field 1:&amp;lt;input type=&amp;quot;text&amp;quot; size=&amp;quot;20&amp;quot; name=&amp;quot;text1&amp;quot;&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
    Field 2:&amp;lt;input type=&amp;quot;text&amp;quot; size=&amp;quot;20&amp;quot; name=&amp;quot;text2&amp;quot;&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
    Field 3:&amp;lt;input type=&amp;quot;text&amp;quot; size=&amp;quot;20&amp;quot; name=&amp;quot;text3&amp;quot;&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
    &amp;lt;input type=&amp;quot;button&amp;quot; name=reset value=&amp;quot;reset&amp;quot; onClick=&amp;quot;resetForm(this.form)&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;/form&amp;gt;&lt;br /&gt;
    &amp;lt;/body&amp;gt;&lt;br /&gt;
    &amp;lt;/html&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
== Form.submit()==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The submit method of the Form object is used to submit a form.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;It operates the same as if a Submit button was clicked.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
    &amp;lt;head&amp;gt;&lt;br /&gt;
    &amp;lt;title&amp;gt; Using the submit method for the Form object&amp;lt;/title&amp;gt;&lt;br /&gt;
    &amp;lt;/head&amp;gt;&lt;br /&gt;
    &amp;lt;body&amp;gt;&lt;br /&gt;
    &amp;lt;script language=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;!--&lt;br /&gt;
    function submitForm(form){&lt;br /&gt;
        document.form1.submit(form);&lt;br /&gt;
    }&lt;br /&gt;
    --&amp;gt;&lt;br /&gt;
    &amp;lt;/script&amp;gt;&lt;br /&gt;
    &amp;lt;form name= &amp;quot;form1&amp;quot; method=&amp;quot;post&amp;quot; action=&amp;quot;http://www.wbex.ru&amp;quot;&amp;gt;&lt;br /&gt;
    This is a sample form&lt;br /&gt;
    &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
    Name:&amp;lt;input type=&amp;quot;text&amp;quot; size=&amp;quot;40&amp;quot; name=&amp;quot;name&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;br&amp;gt;&lt;br /&gt;
    Age:&amp;lt;input type=&amp;quot;text&amp;quot; size=&amp;quot;3&amp;quot; name=&amp;quot;age&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;br&amp;gt;&lt;br /&gt;
    Phone Number:&amp;lt;input type=&amp;quot;text&amp;quot; size=&amp;quot;10&amp;quot; name=&amp;quot;phone&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
    &amp;lt;input type= &amp;quot;button&amp;quot; value=&amp;quot;Submit&amp;quot; onclick = submitForm(this.form)&amp;gt;&lt;br /&gt;
    &amp;lt;/form&amp;gt;&lt;br /&gt;
    &amp;lt;/body&amp;gt;&lt;br /&gt;
    &amp;lt;/html&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
== Form.target==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The target property represents the target window or frame in which the form results will be displayed.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;This can also reflect the TARGET attribute of the HTML &amp;lt;form&amp;gt; tag.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Valid target attributes are: _blank, _parent, _self, and _top.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
    &amp;lt;head&amp;gt;&lt;br /&gt;
    &amp;lt;title&amp;gt; Using the target property of the Form object&amp;lt;/title&amp;gt;&lt;br /&gt;
    &amp;lt;/head&amp;gt;&lt;br /&gt;
    &amp;lt;body&amp;gt;&lt;br /&gt;
    &amp;lt;script language=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;!--&lt;br /&gt;
    function show(){&lt;br /&gt;
        var tar = document.form1.target;&lt;br /&gt;
        if(tar == &amp;quot;_self&amp;quot;){&lt;br /&gt;
          alert(&amp;quot;this window&amp;quot;);&lt;br /&gt;
        } else{&lt;br /&gt;
          alert(&amp;quot;The target has not been specifically specified&amp;quot;);&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    --&amp;gt;&lt;br /&gt;
    &amp;lt;/script&amp;gt;&lt;br /&gt;
    &amp;lt;form name=&amp;quot;form1&amp;quot; action=&amp;quot;post&amp;quot; target=&amp;quot;_self&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
    &amp;lt;input type=&amp;quot;button&amp;quot; value=&amp;quot;submit&amp;quot; onClick=&amp;quot;show()&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;/form&amp;gt;&lt;br /&gt;
    &amp;lt;/body&amp;gt;&lt;br /&gt;
    &amp;lt;/html&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
== Using the Forms Array==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
    &amp;lt;head&amp;gt;&lt;br /&gt;
    &amp;lt;title&amp;gt; Using the forms array to access a form element&amp;lt;/title&amp;gt;&lt;br /&gt;
    &amp;lt;/head&amp;gt;&lt;br /&gt;
    &amp;lt;body&amp;gt;&lt;br /&gt;
    &amp;lt;script language = &amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;!--&lt;br /&gt;
    function showFormName(){&lt;br /&gt;
         var name = document.forms[0].name;&lt;br /&gt;
         alert(&amp;quot;The name of the form is: &amp;quot; + name);&lt;br /&gt;
    }&lt;br /&gt;
    --&amp;gt;&lt;br /&gt;
    &amp;lt;/script&amp;gt;&lt;br /&gt;
    &amp;lt;form name=&amp;quot;form1&amp;quot;&amp;gt;&lt;br /&gt;
    This text box belongs to a form.&lt;br /&gt;
    &amp;lt;input type=&amp;quot;text&amp;quot; name=&amp;quot;street&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
    Click on the button to get the name of the form.&lt;br /&gt;
    &amp;lt;br&amp;gt;&lt;br /&gt;
    &amp;lt;input type=&amp;quot;button&amp;quot; value=&amp;quot;Get Form name&amp;quot; onClick=&amp;quot;showFormName()&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;/form&amp;gt;&lt;br /&gt;
    &amp;lt;form name=&amp;quot;form2&amp;quot;&amp;gt;&lt;br /&gt;
    This is the second form in the document. It contains a FileUpload object.&lt;br /&gt;
    &amp;lt;input type=&amp;quot;file&amp;quot; name=&amp;quot;uploadbox&amp;quot; size=&amp;quot;25&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;/form&amp;gt;&lt;br /&gt;
    &amp;lt;/body&amp;gt;&lt;br /&gt;
    &amp;lt;/html&amp;gt;&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
			</entry>

	</feed>