Latest web development tutorials

HTML DOM는 FileUpload 양식 속성

참조 객체 파일 업로드 파일 업로드 객체

정의 및 사용

양식 속성 복귀는 FileUpload 객체를 포함 형성한다.

재산 반환 양식 객체.

문법

fileuploadObject.form


브라우저 지원

Internet ExplorerFirefoxOperaGoogle ChromeSafari

모든 주요 브라우저는 양식 속성을 지원


다음 예는 <입력 유형 = "파일"> 반환 요소는 형태 ID를 속하는 :

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>本教程(w3big.com)</title>
<script>
function displayResult(){
    var x=document.getElementById("fname").form.id;
    alert(x);
}
</script>
</head>
<body>

<form id="form1">
选择一个文件上传:
<input type="file" id="fname" size="50"/>
</form>
<button type="button" onclick="displayResult()">显示包含fileupload的表单</button>

</body>
</html>

»시도


참조 객체 파일 업로드 파일 업로드 객체