The <input type="week"> allows the user to select a week and year.
Depending on browser support, a date picker can show up in the input field.
| Live Demo & Try it yourself! | Read More » » |
| 358 | Share |
The <input type="week"> allows the user to select a week and year.
Depending on browser support, a date picker can show up in the input field.
| Live Demo & Try it yourself! | Read More » » |
The <input type="url"> is used for input fields that should contain a URL address.
Depending on browser support, the url field can be automatically validated when submitted.
Some smartphones recognize the url type, and adds ".com" to the keyboard to match url input.
| Live Demo & Try it yourself! | Read More » » |
The <input type="time"> allows the user to select a time (no time zone).
Depending on browser support, a time picker can show up in the input field.
| Live Demo & Try it yourself! | Read More » » |
The <input type="tel"> is used for input fields that should contain a telephone number.
| Live Demo & Try it yourself! | Read More » » |
The <input type="search"> is used for search fields (a search field behaves like a regular text field).
| Live Demo & Try it yourself! | Read More » » |
The <input type="range"> defines a control for entering a number whose exact value is not important (like a slider control). Default range is 0 to 100. However, you can set restrictions on what numbers are accepted with the min, max, and step attributes:
| Live Demo & Try it yourself! | Read More » » |
The <input type="number"> defines a numeric input field.
You can also set restrictions on what numbers are accepted.
The following example displays a numeric input field, where you can enter a value from 1 to 5:
| Live Demo & Try it yourself! | Read More » » |
The <input type="month"> allows the user to select a month and year.
Depending on browser support, a date picker can show up in the input field.
| Live Demo & Try it yourself! | Read More » » |
The <input type="hidden"> defines a hidden input field (not visible to a user).
A hidden field lets web developers include data that cannot be seen or modified by users when a form is submitted.
A hidden field often stores what database record that needs to be updated when the form is submitted.
Note: While the value is not displayed to the user in the page's content, it is visible (and can be edited) using any browser's developer tools or "View Source" functionality. Do not use hidden inputs as a form of security!
| Live Demo & Try it yourself! | Read More » » |
ਫਾਈਲ ਅਪਲੋਡ ਕੰਟਰੋਲ (FILE UPLOAD CONTROL) :
ਜੇ ਅਸੀ ਕਿਸੇ ਯੂਜ਼ਰ ਨੂੰ ਉਸਦੇ ਕੰਪਿਊਟਰ ਤੋ ਸਾਡੀ ਵੈੱਬਸਾਈਟ ਤੇ ਇਕ File Upload ਕਰਨ ਦੀ ਆਗਿਆ ਦੇਣਾ ਚਾਹੁੰਦੇ ਹਾਂ ਤਾਂ ਸਾਨੂੰ ਫਾਈਲ ਅਪਲੋਡ ਕੰਟਰੋਲ ਦੀ ਵਰਤੋ ਕਰਨ ਦੀ ਜਰੂਰਤ ਪਵੇਗੀ। ਇਸ ਕੰਟਰੋਲ ਨੂੰ ਫਾਈਲ ਸਿਲੈਕਟ ਬਾਕਸ ਵੀ ਕਿਹਾ ਜਾਂਦਾ ਹੈ। ਇਸ ਕੰਟਰੋਲ ਨੂੰ ਬਣਾਉਣ ਲਈ ਅਸੀ type="file" ਐਟਰੀਬਿਊਟ ਦੇ ਨਾਲ <input> ਟੈਗ ਦੀ ਵਰਤੋ ਕਰਦੇ ਹਾਂ। ਫਾਈਲ ਅਪਲੋਡ ਕੰਟਰੋਲ ਦੀ ਬੁਨਿਆਦੀ ਉਦਾਹਰਣ ਇਸ ਪ੍ਰਕਾਰ ਹੈ:
< input type ="file" name="fileupload" accept="image/*">
ਸਰਵਰ ~ਸਾਈਡ ਸਕਿਰਪਟਿੰਗ ਭਾਸ਼ਾਵਾ ਜਿਵੇ ਕਿ JSP, ASP, PHP ਆਦਿ ਲਈ Name ਐਟਰੀਬਿਊਟ ਦੀ ਜਰੂਰਤ ਪੈਂਦੀ ਹੈ ਅਤੇ accept ਐਟਰੀਬਿਊਟ ਸਰਵਰ ਦੁਆਰਾ ਸਵੀਕਾਰ ਕੀਤੀਆ ਜਾਣ ਵਾਲੀਆ ਫਾਈਲਾ ਦੀਆ ਕਿਸਮਾਂ ਨੂੰ ਨਿਰਧਾਰਿਤ ਕਰਦਾ ਹੈ ਕਿ ਸਰਵਰ ਸਿਰਫ ਤਸਵੀਰ ਦੀ ਕਿਸਮ ਵਾਲੀਆ ਫਾਈਲਾ (Image type files) ਨੂੰ ਹੀ ਸਵੀਕਾਰ ਕਰੇਗਾ:
D./main/front.html
file upload example ______Browse.......
___ _____
choose to file upload
Data (d.) ^main^ ^
search main
organize• New folder
Document ^
Download
Music bookmarks
pictures
video computer
win 10(c)
data(d) ^ education
file name education^ ¤
Image file(avcr. avcr. avcr)^
open cancel
ਯੂਜ਼ਰ ਦੁਆਰਾ ਫਾਈਲ ਸਿਲੈਕਟ ਕੀਤੇ ਜਾਣ ਤੋ ਬਾਅਦ
D.main.form.html
file upload example
D:/main/education.jpg browse...........
ਫਾਈਲ ਅਪਲੋਡ ਕੰਟਰੋਲ ਦੀ ਉਦਾਹਰਣ
ਜਦੋ ਅਸੀ Browse.... ਬਟਨ ਤੇ ਕਲਿੱਕ ਕਰਦੇ ਹਾਂ ਤਾਂ ਫਾਈਲ ਅਪਲੋਡ ਕਰਨ ਲਈ ਇਕ ਡਾਇਲਾਗ ਬਾਕਸ choose file to upload open ਹੋਵੇਗਾ। ਫਾਈਲ ਸਿਲੈਕਟ ਕਰਨ ਤੋ ਬਾਅਦ ਇਸ ਡਾਇਲਾਗ ਬਾਕਸ (box) ਦੇ ਓਪਨ button ਤੇ ਕਲਿੱਕ ਕਰੋ। ਸਿਲੈਕਟ ਕੀਤੀ ਗਈ ਫਾਈਲ ਦਾ ਨਾਂ ਐਬਲੋਲਿਊਟ ਪਾਥ ਸਮੇਤ Browse... ਬਟਨ ਦੇ ਨਾਲ ਲੱਗਦੇ ਰੀਡ ਓਨਲੀ text box ਵਿਚ ਦਿਖਾਈ ਦੇਵੇਗਾ,
FILE UPLOAD CONTROL
The <input type="file"> defines a file-select field and a "Browse" button for file uploads.
| Live Demo & Try it yourself! | Read More » » |