Notice
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 | 31 |
Tags
- 안드로이드 gcm
- html5
- UML
- C#
- android 효과음
- 설치
- mysql
- xe
- FCM
- 안드로이드 푸쉬
- 자바스크립트
- dovecot
- 안드로이드 푸시
- C# IO
- Android
- not working
- PHP
- 자동 생성
- 우분투
- WebView
- roundcube
- curl
- 안드로이드
- php 시큐어코딩
- Mail Server
- chart.js
- soundpool
- php 취약점
- 폼메일
- javascript
Archives
- Today
- Total
그러냐
HTML <input> accept Attribute 본문
반응형
HTML <input> accept Attribute
Example
Specify that the server accepts only image files in the file upload:
<form action="demo_form.asp">
<input type="file" name="pic" accept="image/*">
<input type="submit">
</form>
Definition and Usage
The accept attribute specifies the types of files that the server accepts (that can be submitted through a file upload).
Note: The accept attribute can only be used with <input type="file">.
Tip: Do not use this attribute as a validation tool. File uploads should be validated on the server.
Browser Support
The numbers in the table specify the first browser version that fully supports the attribute.
Attribute | |||||
---|---|---|---|---|---|
accept | 8.0 | 10.0 | 4.0 | 6.0 | 15.0 |
Differences Between HTML 4.01 and HTML5
NONE.
Syntax
<input accept="file_extension|audio/*|video/*|image/*|media_type">
Tip: To specify more than one value, separate the values with a comma (e.g. <input accept="audio/*,video/*,image/*" />.
Attribute Values
Value | Description |
---|---|
file_extension | A file extension starting with the STOP character, e.g: .gif, .jpg, .png, .doc |
audio/* | All sound files are accepted |
video/* | All video files are accepted |
image/* | All image files are accepted |
media_type | A valid media type, with no parameters. Look at IANA Media Types for a complete list of standard media types |
출처 : http://www.w3schools.com/tags/att_input_accept.asp
반응형
'html' 카테고리의 다른 글
Postman 개요 / 설치 / 사용법 / 활용 방법 (0) | 2018.08.30 |
---|---|
get방식의 글자수 제한은 256자가 아니다 (0) | 2017.12.20 |
html5 | input type number maxlength 설정 ( 모바일 ) / oninput, max, min 출처: http://cofs.tistory.com/215 [CofS] (0) | 2017.03.29 |
html5 파일첨부 미리보기 썸네일 (0) | 2017.03.02 |
[HTML5] 2. 간단해진 HTML 문서 형식 선언 <!DOCTYPE html> (0) | 2017.02.01 |