如何清空file 对象的内容 1. 也只能用 reset form 了。2. \ 是JS里的转义符, "\" JS会认为是 " + \",所以你要用ss=s.split("\\") 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <script> function cls(){ xxx.focus(); document.execCommand("selectall"); document.execCommand("Delete"); } </script> <input type=file name=xxx> <input type=button onclick="cls()" value=清除> <script> function cls(){ xxx.select(); document.execCommand("delete"); } </script> <input type=file name=xxx> <input type=button onclick="cls()" value=清除> 大神 来救~~ 求JS高手,我的IE9报错:SCRIPT5022: DOM Exception: INVALID_CHARACTER_ERR (5) 客户端控制TreeView——新手请教() 怎么才能用JS插入背景音乐呢? 求一个关于时间段的算法, 关于时间段不能重叠的问题 请教一下javascript中数组的问题 如何当用户一有输入(鼠标和键盘)就做某动作 lilysunny13(百合花) 请进 js拼接字符串 js控制文件出错 怎么才能像IE菜单一样让菜单被点击以后,才显示下拉菜单?(40分奉送) 在弹出窗口中,能否利用原窗口中的JAVASCRIPT中定义的变量?
function cls(){
xxx.focus();
document.execCommand("selectall");
document.execCommand("Delete");
}
</script>
<input type=file name=xxx>
<input type=button onclick="cls()" value=清除>
function cls(){
xxx.select();
document.execCommand("delete");
}
</script>
<input type=file name=xxx>
<input type=button onclick="cls()" value=清除>