type

收藏:0   阅读:21

FileUpload type 属性


定义和用法

type 属性返回 FileUpload 对象的 form 元素类型。

对于 FileUpload 对象,该属性返回 "file"。

语法

fileuploadObject.type


浏览器支持

Internet ExplorerFirefoxOperaGoogle ChromeSafari

所有主要浏览器都支持 type 属性


实例

显示 FileUpload 对象的 form 元素的类型:

<html>
<head>
<script>
function displayResult()
{
var x=document.getElementById("fname").type;
alert(x);
}
</script>
</head>
<body>

<form>
Select a file to upload:
<input type="file" id="fname">
</form>

<button type="button" onclick="displayResult()">Display input type</button>

</body>
</html>

© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!