@@ -105,34 +105,34 @@ For instance:
105105</form >
106106
107107<script >
108- alert (form .elements .login == form .login ); // true, the same <input>
108+ alert (form .elements .login == form .login ); // true, همان <input>
109109
110- form .login .name = " username" ; // change the name of the input
110+ form .login .name = " username" ; // را تغییر میدهد input نام
111111
112- // form.elements updated the name:
112+ // میکند update را name، forms.elements
113113 alert (form .elements .login ); // undefined
114114 alert (form .elements .username ); // input
115115
116116* ! *
117- // form allows both names: the new one and the old one
117+ // را مجاز میکند: هم جدید و هم قدیمی name فرم هر دو
118118 alert (form .username == form .login ); // true
119119*/ ! *
120120 </script >
121121```
122122
123- That's usually not a problem, however, because we rarely change names of form elements .
123+ با این حال، این معمولا یک مشکل نیست، چون ما به ندرت نام elementهای فرم را تغییر میدهیم .
124124
125125````
126126
127127## Backreference: element.form
128128
129- For any element, the form is available as `element.form`. So a form references all elements, and elements reference the form .
129+ برای هر elementای، فرم به عنوان `element.form` قابل دسترسی است. بنابراین یک فرم به همهی elementها ارجاع میدهد و elementها هم به فرم ارجاع میدهند .
130130
131- Here's the picture :
131+ این هم تصویرش است :
132132
133133
134134
135- For instance :
135+ برای مثال :
136136
137137```html run height=40
138138<form id="form">
@@ -152,22 +152,22 @@ For instance:
152152
153153## Form elements
154154
155- Let's talk about form controls.
155+ .صحبت کنیم form controls بیایید دربارهی
156156
157157### input and textarea
158158
159- We can access their value as `input.value` (string) or `input.checked` (boolean) for checkboxes and radio buttons.
159+ .به مقدار آن دسترسی داشته باشیم radio buttons و checkboxes برای `input.value` (string) یا `input.checked` (boolean) ما میتوانیم با
160160
161- Like this :
161+ مثل این :
162162
163163```js
164164input.value = "New value";
165165textarea.value = "New text";
166166
167- input.checked = true; // for a checkbox or radio button
167+ input.checked = true; // radio button یا checkbox برای یک
168168```
169169
170- ```warn header="Use `textarea.value`, not `textarea.innerHTML`"
170+ ```warn header="Use `textarea.value`, نه `textarea.innerHTML`"
171171Please note that even though `<textarea>...</textarea>` holds its value as nested HTML, we should never use `textarea.innerHTML` to access it.
172172
173173It stores only the HTML that was initially on the page, not the current value.
0 commit comments