Input types Attributes:-
यह इनपुट element के type को indicates करता है। यह एक empty टैग है इनपुट की डिफ़ॉल्ट value text है।
Ex: -<input type=“text”>
- Text– यह single-line टेक्स्ट फ़ील्ड को defines करता है।
<input type=“text”> - Password– एक पासवर्ड फ़ील्ड टेक्स्ट फ़ील्ड की तरह है, अंतर यह है कि यह control प्रत्येक टाइप किए गए character को character के बजाय asterisk(*) या बुलेट () प्रदर्शित करके hide करता है।
<input type=“password”> - Button– जब कोई users बटन पर क्लिक करता है तो स्क्रिप्ट को active करने के लिए इसका उपयोग वेब फॉर्म पर एक बटन जोड़ने के लिए किया जाता है।
<input type=”button” onclick=”alert(‘welcome to AK IT SOLUTION’)” value=”click me”>
- Email– इस फ़ील्ड का उपयोग किसी ईमेल address या ईमेल address की list को किसी form में जोड़ने के लिए किया जाता है, इनपुट format nielitexam2019@gmail.com जैसा ईमेल होना चाहिए अन्यथा यह एक error का संकेत देगा।
<input type=“email”> - Check Box– एक चेक बॉक्स एक छोटा बॉक्स होता है, जिसमें selected होने पर एक चेकमार्क शामिल होता है। इसका उपयोग उपयोगकर्ता को वेब पेज पर उपलब्ध विकल्पों में से एक या एक से अधिक विकल्पों का चयन करने की अनुमति देने के लिए किया जाता है। कोई उपयोगकर्ता चेक बॉक्स को क्लिक करके उसे select या clear कर सकता है
<input type=“checkbox”>
- Radio Button– रेडियो बटन का उपयोग विकल्पों की एक series बनाने के लिए किया जाता है जिसमें से केवल एक का चयन किया जा सकता है इसे एक circle के रूप में display किया जाता है जिसे select किये जाने पर बीच में एक बिंदु प्रदर्शित करता है
<input type=“radio”>
Note:- Checkbox and Radio Button is used to Checked Attributes.
- URL- URL फ़ील्ड का उपयोग केवल वेब address को उनके सही format में enter करने के लिए किया जाता है यदि URL सही format में enter नहीं किया गया है तो URL फ़ील्ड वेब address enter करने के लिए टेक्स्ट फ़ील्ड को validate करता है।
<input type=“url”> - Autofocus– माउस पॉइंटर का फोकस इनपुट फील्ड पर रखने में मदद करता है
- Pattern– टेक्स्ट की regular expression को defines करता है जिसे टेक्स्ट फ़ील्ड में enter किया जाना चाहिए।
- Search Box– इसका उपयोग किसी form में search बॉक्स जोड़ने के लिए किया जाता है।
<input type=“search”> - Tel- टेलीफ़ोन नंबर enter करने के लिए tel type एक-पंक्ति plain-text edit को represents करता है।
<input type=“tel”> - Range- रेंज इनपुट limited range के numerical values के इनपुट को represents करता है।
<input type=“range”> - Number- Number का उपयोग टेक्स्ट बॉक्स को मान्य करने के लिए केवल तभी किया जाता है जब फ़ील्ड के भीतर value numerical value हो।
<input type=“number”> - File– इसका उपयोग वेब पेज पर फाइल अपलोड करने के लिए किया जाता है।
<input type=”file” accept=”audio/*” multiple> <!… accept=”audio, video, image …>
- Image– image attribute के द्वारा फार्म मे इमेज का बटन बनाने के लिए किया जाता है
<input type=”image” src=”subscribe.jpg”> - Submit– सबमिट बटन का उपयोग फॉर्म डेटा को <form action> टैग में specifiedURL पर transfer करने के लिए किया जाता है
<input type=“submit”>
- Reset Button– एक Reset button users को टेक्स्ट फ़ील्ड में enter किए गए सभी डेटा को clear करने में सहायता करता है
<input type=“reset”>
- Date– इसका उपयोग इनपुट फ़ील्ड के लिए किया जाता है जिसमें एक तिथि होनी चाहिए
<input type=“date”>
- Time– It allows the user to select a time.
<input type=“time”> - Datetime-local– यह users को date और time का चयन करने की अनुमति देता है
<input type=“datetime-local”>
- Month– यह users को एक month और year का चयन करने की अनुमति देता है।
<input type=“month”>
- Week– यह users को एक सप्ताह और year का चयन करने की अनुमति देता है।
<input type=“week”> - Color– इसका उपयोग इनपुट फ़ील्ड के लिए किया जाता है जिसमें एक color होना चाहिए.
<input type=“color”>
Input types Attributes:-
It indicates the type of input element. It’s an empty tag. The default value is text.
Ex: – <input type=“text”>
- Text– It defines a single-line text field.
<input type=“text”> - Password– A password field is like text field, the difference being that this control hides each typed character by displaying an asterisk(*) or bullets(●) instead of the character itself.
<input type=“password”>
Button– This is used to add a button on a web form to activate a script when an user click the button.
<input type=”button” onclick=”alert(‘welcome to AK IT SOLUTION’)” value=”click me”>
- Email– This field is used to add an email address or a list of email address to a form, where type=“email” is a value for the input type. The input format should be an email like nielitexam2019@gmail.com else it will prompt an error.
<input type=“email”> - Check Box– A check box is a small box, which when selected includes a checkmark. It is used to allow the user to select one or more than one of the options available on a web page. An User can select or clear the check box by clicking it.
<input type=“checkbox”> - Radio Button– A radio button is used to create a series of options of which only one can be selected. It is displayed as a circle which when selected, displays a dot in the middle.
<input type=“radio”>
Note:- Checkbox and Radio Button is used to Checked Attributes.
- URL- The URL field is used to enter only the web addresses, in their correct format. If the URL is not entered in the correct format then the URL field validates the text field to enter web address.
<input type=“url”>
Autofocus– helps in keeping the focus of mouse pointer on the input field.
Pattern – defines the regular expression of the text that should be entered in the text field. - Search Box– This is used to add a search box to a form.
<input type=“search”> - Tel- The tel type represents a one-line plain-text edit for entering a telephone number.
<input type=“tel”> - Range- Range input represents the input of limited range numerical values.
<input type=“range”> - Number- Number is used to validate the textbox only if the value within the field is a numerical value.
<input type=“number”>
File– This is used to upload a file on a web page. You also need to set the enctype=“multipart/form-data”
<input type=”file” accept=”audio/*” multiple> <!… accept=”audio, video, image …>
- Image– It represents either an image from which the UA enables a user to interactively select a pair of coordinates and submit the form, or alternatively a button from which the user can submit the form.
<input type=“image” src=”subscribe.jpg”> - Submit– A submit button is used to transfer form data to the URL specified in the <form action> tag.
<input type=“submit”> - Reset Button– A reset button helps user to clear all the data that they have entered in the text fields.
<input type=“reset”> - Date– This is used for input fields that should contain a date.
<input type=“date”> - Time– It allows the user to select a time.
<input type=“time”> - Datetime-local– It allows the user to select a date and time.
<input type=“datetime-local”> Month – It allows the user to select a month and year.
<input type=“month”> - Week– It allows the user to select a week and year.
<input type=“week”> - Color– It is used for input fields that should contain a color.
<input type=“color”>