ابدأ بالتواصل مع الأشخاص وتبادل معارفك المهنية

أنشئ حسابًا أو سجّل الدخول للانضمام إلى مجتمعك المهني.

متابعة

What is use of required attribute in HTML?

user-image
تم إضافة السؤال من قبل Jayahari KV , Web Designer / Manager , C-DIT
تاريخ النشر: 2015/03/28
Erwin Cataniag
من قبل Erwin Cataniag , Admin Secretary / Document Clerk , SISCO

As required field validator in ASP.NET. 

MR HEMANT
من قبل MR HEMANT , PHOTOSHOP,DESING,PHOTOGRAPER , PHOTO STUDEO

for many reasosn every lens do shoot a certain type, each lens has a specific angle of photography

Murad Bin Makhashin
من قبل Murad Bin Makhashin , Software Developer , Dar Al Tamleek

In HTML5 required attribute was introduced to textual (if I may) input element. It will make sure a form won't submit unless that input element has value. Think about it as the required field validator in ASP.NET. Here is a simple example, the page won't submit to itself until the text box has some value 

<!doctype html>

<html>

<head>

<title>Using 'required' attribute - also 'placeholder' attribute ;)</title>

</head>

<form>

<input type="text" placeholder="enter anything" required />&nbsp;<button>Submit</button>

<form>

</html>

 

I hope this answers your question.

 

Happy coding :)

 

المزيد من الأسئلة المماثلة

هل تحتاج لمساعدة في كتابة سيرة ذاتية تحتوي على الكلمات الدلالية التي يبحث عنها أصحاب العمل؟