FORM Tagı

Form tagı parametreleri
 
<form action="bir.php" enctype="multipart/form-data" method="post">
           
</form>
 
 
 

Attributes

New : New in HTML5.

Attribute Value Description
accept MIME_type Sunucunun kabul etmesi gereken dosya türünü belirtir. HTML5 de desteklenmez.
accept-charset character_set

Yollanan karaterlerin kodlama türünü belirtir.

action URL

Form data bilgilerinin nereye yollanacağını belirtir. Tanımlanmazsa site araçlarından birine dönüşür.

Specifies where to send the form-data when a form is submitted

autocompleteNew on
off
Specifies whether a form should have autocomplete on or off
enctype application/x-www-form-urlencoded
multipart/form-data
text/plain
Form bilgilerinin servera yollanırken nasıl kodlanacağını belirtir. (only for method="post")
method get
post

Form bilgilerinin gönderilme metodunu belirtir.

GET genellikle kısa form bilgileri için kullanır. GET kullanıldığında adres çubuğunda gönderilen form bilgileri görünür.

POST genellikle yoğun form bilgileri için kullanılır.

Specifies the HTTP method to use when sending form-data

name text Formun adı
novalidateNew novalidate Specifies that the form should not be validated when submitted
target _blank
_self
_parent
_top
Form bilgileri yollandıktan sonra, yollanan sayfanın nerede açılacağını belirtir.

enctype

Value Description
application/x-www-form-urlencoded Default. All characters are encoded before sent (spaces are converted to "+" symbols, and special characters are converted to ASCII HEX values)
multipart/form-data No characters are encoded. This value is required when you are using forms that have a file upload control
text/plain Spaces are converted to "+" symbols, but no special characters are encoded

 

Olay Çeşitleri

  • onsubmit, onreset, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup
 

Örnek

<form action="form_action.asp"  method="get">

First name:
<input type="text" name="fname" value="Mickey" />
<br />
Last name:
<input type="text" name="lname" value="Mouse" />
<br />
<input type="submit" value="Submit" />

</form>

<p>
If you click the "Submit" button, you will send your input to a new page called form_action.asp.
</p>

 

First name:
Last name:
 

 

Kaynak

Yorumunuzu Ekleyin


Yükleniyor...
Yükleniyor...