<input type='file'> 标签选中文件了 但是想取消怎么弄
1个回答
2014-11-05
展开全部
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title> New Document </title>
<meta name="Generator" content="EditPlus">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
<script type="text/javascript">
<!--
function clear(fileId){
var obj = document.getElementById(fileId) ;
obj.outerHTML=obj.outerHTML;
}
//-->
</script>
</head>
<body>
<input type="file" id="fileupload"/>
<button type="button" onclick="clear('fileupload');">clear</button>
</body>
</html>
<html>
<head>
<title> New Document </title>
<meta name="Generator" content="EditPlus">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
<script type="text/javascript">
<!--
function clear(fileId){
var obj = document.getElementById(fileId) ;
obj.outerHTML=obj.outerHTML;
}
//-->
</script>
</head>
<body>
<input type="file" id="fileupload"/>
<button type="button" onclick="clear('fileupload');">clear</button>
</body>
</html>
本回答被提问者和网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询