怎样用js清除file type里的内容

来源:百度知道 编辑:UC知道 时间:2024/06/07 05:56:37
<script>
function check(){
。。。。。。(省略其它内容)
alert("。。。");

在这之后要清空picture 刚浏览的路径 变回原来空的框子

}
</script>

表单:
<input name="picture" type="file" onchange="check()">

这个怎么做?就是利用js把这里面的内容清空~~~哪位高手指点一下~~~谢谢啦!

<!--STATUS OK-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>怎样用js清除file type里的内容_百度知道 </title>
<link rel="alternate" type="application/rss+xml" title="“怎样用js清除file type里的内容”的最新回答(RSS 2.0)" href="http://zhidao.baidu.com/q?ct=20&qid=114198190&pn=65535&rn=25&tn=rssqb">
<script>
function check(o){

o.value=""; //在这之后要清空picture 刚浏览的路径 变回原来空的框子

}
</script>
</head>
<body>

<input name="picture" type="file" onchange="check(this)">