DEV Community

Cover image for HTML da Form bilan ishlash
Jamoliddin
Jamoliddin

Posted on

HTML da Form bilan ishlash

  • HTML da formalar form tegi ichiga quyidagicha yoziladi. formalar asosan veb saytlarga kirgan paytda ko'rishimiz mumkin
<form>
    <input type="text" placeholder="Text">
    <input type="email" placeholder="Email">
</form>
Enter fullscreen mode Exit fullscreen mode

Image description

  1. text type bu istalgan ma'lumotlarni kiritish uchun ishlatiladi
  2. email type faqatgina emailni user kiritgan tekst ichida email bo'lsagina qabul qiladi aks holda qaytadan kiritishini so'raydi.
<form>
    <label>password tegi </label> <br>
<input type="password" placeholder="parol"> <br>
<label>number tegi </label> <br>
<input type="number" placeholder="son"> <br>

</form>

Enter fullscreen mode Exit fullscreen mode

Image description

3.password type bu biz kiritgan parol ko'rinmasligini ta'minlaydi

4.number type bu user kiritadigna ma'lumot faqat sonlar bo'lishini ta'minlaydi

<form>
    <label>file tegi </label> <br>
<input type="file" multiple > <br>
<label>date </label> <br>
<input type="date" > <br>
</form>

Enter fullscreen mode Exit fullscreen mode

Image description

  1. file type file ni jonatish uchun ishlatiladi multiple keywordi esa bir nechta faylni bittada jo'natish vazifasini bajaradi
  2. date type bu sanani tanlash uchun ishlatiladi

Top comments (0)