求助,清空file控件内容问题 本帖最后由 nfclass 于 2011-07-17 11:08:08 编辑 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 这样试试<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head> <title></title></head><body><input type="file" id="subattname" /><input type="button" onclick="fn()" value="Btn" /><script type="text/javascript"> function fn() { var f = document.getElementById('subattname'); alert(f.value); f.outerHTML += '';//ie f.value=''; //firefox }</script></body></html>,取不到file名,你是怎么取的呢? html 多个下拉框有相同的数据,选中一个数据其他下拉框删除这个数据,用js怎么实现?哪位大侠帮个忙呀!! JS截取日期,新手求助!!! 正则表达式问题 怎么才能让js进行点击 数据要刷新一次才显示 从网页上DOWN个日历HTML代码 非常奇怪的问题 哪里有JavaScript的API文档可以查? 在提交表單時, 如果 有selected 控件, 我不想手動選取, 讓它自動選取所有的項目, 可以實現嗎? 怎么实现csdn左侧的那个导航? Firefox fileupload绝对路径 JavaBeans疑惑
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
</head>
<body>
<input type="file" id="subattname" />
<input type="button" onclick="fn()" value="Btn" />
<script type="text/javascript">
function fn() {
var f = document.getElementById('subattname');
alert(f.value);
f.outerHTML += '';//ie
f.value=''; //firefox
}
</script>
</body>
</html>,取不到file名,你是怎么取的呢?