怎么通过javascript改变文件上载的file域中的文件路径?

怎么通过javascript改变文件上载的file域中的文件路径?
---------------------------------------------------------------

为只读,不可修改,强行的话有安全提示.

1<script>   
2function v(){   
3t.focus();   
4var WshShell=new ActiveXObject("WScript.Shell")   
5WshShell.sendKeys("c:\\\4.gif")   
6}   
7</script>

例子:file控件本为只读,但可以能过sendkeys方法进行强行赋值(除人工输入)

1<br/>
1<input onclick="v()" type="button" value="给它值c:\\\4.gif"/>

:

1<input id="t" type="file"/>
Published At
Categories with Web编程
Tagged with
comments powered by Disqus