HTML required Attribute

The HTML input required attribute specifies that an input field must be filled before submitting the form. It is used to prevent the form field from being blank before it is filled. You can use it to prevent blank, text, tel, date pickers, number, email, password, checkbox, radio input fields.

 <form action="" method="">
  <label for="name">Name:</label>
  <input type="text" id="name" name="name" required>
  <input type="submit" value="Send">

To make a checbox field mandatory.

<input type="checkbox" name="onay" class="onay" required> 

0 Yorum

Soru & Yorum

Web Tasarım

Renkli Kare

Web Tasarım Ajansı