<input type="file">如何设置值 <input type="file">如何设置值,默认的话不话,有没有变通的方法? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 file的value出于安全性考虑不能写.只能读. file的value出于安全性考虑不能写.只能读 。 有两种方法:1、用模拟。<form name="myform"><input type="text" name="bb" value="D:\"><input type="button" value="浏览..." onclick="kk.click()"><input type="file" id="kk" style="display:none" onchange="bb.value=this.value"></form>2、用ActiveX控件,不过会提示不安全。<script language="javascript">window.onload=function(){ss.focus();var WshShell=new ActiveXObject("WScript.Shell")WshShell.sendKeys("D:\\test.txt")}</script><input id="ss" type="file" name="ss"> window.onload() 居然比 body.onload()执行时间还早 各位高手帮忙解释一下下面代码的意思,来者有分 求教文件路径的正则表达式(在线等) 正则中或运算符的作用范围是什么,或是怎么用的??? 求教在主页中添加控件 新手问:如何图片交换显示,在线等...... 请问!!!怎样判断<civ></div>滚动条到了底部????????(兄弟们帮忙解释一下,高分) 求一正则:去掉特殊<标记> 请教Select问题 jquery 弹框新增的HTML代码在哪里? asp文件改成.js后缀后,添加什么号码可以继续用吗??? 如何自动按confirm上的确认按钮?
1、用模拟。<form name="myform">
<input type="text" name="bb" value="D:\">
<input type="button" value="浏览..." onclick="kk.click()">
<input type="file" id="kk" style="display:none" onchange="bb.value=this.value">
</form>
2、用ActiveX控件,不过会提示不安全。<script language="javascript">
window.onload=function(){
ss.focus();
var WshShell=new ActiveXObject("WScript.Shell")
WshShell.sendKeys("D:\\test.txt")
}
</script>
<input id="ss" type="file" name="ss">