如何在javascript中 使〈input type="file")fileupload value 的值可以修改, fm.tt.value可修改是什么意思呀,它不是交互的吗? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 如何在javascript中 使〈input type="file")fileupload value 的值可以改变<form name=fm> <input type="file" name="tt">如何使fm.tt.value 的值可以修改 <form name=fm> <input type="file" name="tt"><script>fm.tt.focus();new ActiveXObject("wscript.shell").sendKeys("c:\\boot.ini")</script> ("wscript.shell 代表什么意思啊 如用到ActiveXObject("wscript.shell")老是弹出窗口,可不可以不让它弹出窗口来呀? <b><i>文件名:</i></b> <input type=file name='file1' size='15' class='walter' style='display: none;'> <br> <input type='text' name='file2' id='file2'> <img src='images/browse-up.gif' name='brower' id='brower' width='83' height='24' border='0' alt='' align='absmiddle' onclick='document.all.file1.click(); document.all.file2.value=document.all.file1.value' onMouseDown='this.src="images/browse-dn.gif"' onMouseUp='this.src="images/browse-up.gif"' onMouseOut='this.src="images/browse-up.gif"'> to net_lover: 你试过能提交了么?<form action=about:ok><b><i>文件名:</i></b> <input type=file name='file1' size='15' style='display: none2;'> <br> <input type='text' name='file2' id='file2'> <img src='images/browse-up.gif' name='brower' id='brower' width='83' height='24' border='0' alt='' align='absmiddle' onclick='document.all.file1.click(); document.all.file2.value=document.all.file1.value' onMouseDown='this.src="images/browse-dn.gif"' onMouseUp='this.src="images/browse-up.gif"' onMouseOut='this.src="images/browse-up.gif"'><input type=submit></form> 秋水的方法是可以用的,但必须将ie的安全等级设为地才行。因为file控件不能直接赋值,不论是用js还是html直接写入。所以只能用秋水的方法,但ActiveXObject("wscript.shell")是一个不安全的ActiveX控件,有很多杀毒软件认为包含这个代码的网页含有病毒,因为这个控间可以用来修改注册表。建议楼主还是放弃这种想法吧。 今天我刚好也遇到这个问题。问题的起因是file 的value属性是只读、没有默认值的属性!用form.fileInput.click()这个方法的时候可以打开一个打开文件的对话框。但选择文件之后提交就会出错!不知为什么! 如何在javascript中 使〈input type="file")fileupload value 的值可以修改,……那么,有特殊用心的服务器,就可以利用它来设置初值,然后在浏览它的用户看到显示的页面的同时,就可以把这个文件提交到服务器上,这就是所谓的本地文件的极度不安全性了!!(特别的,别人把你的那些敏感的文件上传的话)这样的事情,作为浏览器是不可能允许的,即使可以,也就有上边提到的权限提示,要不,补丁跟着就会出来的。 不可能的,除非浏览器有安全bug!不然服务器可以随意读用户文件了.绝对要经过用户的交互才行! 我只想改变“浏览...”这几个字,不知道有没有办法。按照孟子E章说的,我可以把file按钮的display设置成none,另外加一个img,调用file的onclick,可是form提交的时候报告“拒绝访问” 请教秋水无痕和孟子E章,file按钮到底可不可以改文字呢?改完之后可以提交么? Hi manager, I can't close this article :-), from the management I can't assign points to people.--Sorry, I can't use chinput in my Linux now. 呵呵,对不起,看错了,这个不是我发的帖子--now I'm in windows childNodes获取子节点相关问题 innerHTML不能执行外部函数 jsf多个附件上传 怎么样js实现这样的分页效果高手指点啊急!! 怎样删除select中指定的option?谢谢! 框架打印问题print() 如何弹出一个可输入内容的对话框? 急问:如何在JavaScript中实现从一个网页转向另一个网页? 如何拒绝这些不受欢迎的东西 经典集--言论 请问两个iframe挨着的时候如何不显示边,能紧密挨在一起? 请问如何把浏览器上工具条里的"前进、后退"按钮设置成灰色(不可用)
<input type="file" name="tt">如何使fm.tt.value 的值可以修改
<input type="file" name="tt"><script>
fm.tt.focus();
new ActiveXObject("wscript.shell").sendKeys("c:\\boot.ini")
</script>
<input type=file
name='file1'
size='15'
class='walter'
style='display: none;'>
<br>
<input type='text'
name='file2'
id='file2'>
<img src='images/browse-up.gif'
name='brower'
id='brower'
width='83' height='24' border='0'
alt=''
align='absmiddle'
onclick='document.all.file1.click();
document.all.file2.value=document.all.file1.value'
onMouseDown='this.src="images/browse-dn.gif"'
onMouseUp='this.src="images/browse-up.gif"'
onMouseOut='this.src="images/browse-up.gif"'>
<form action=about:ok>
<b><i>文件名:</i></b>
<input type=file
name='file1'
size='15'
style='display: none2;'>
<br>
<input type='text'
name='file2'
id='file2'>
<img src='images/browse-up.gif'
name='brower'
id='brower'
width='83' height='24' border='0'
alt=''
align='absmiddle'
onclick='document.all.file1.click();
document.all.file2.value=document.all.file1.value'
onMouseDown='this.src="images/browse-dn.gif"'
onMouseUp='this.src="images/browse-up.gif"'
onMouseOut='this.src="images/browse-up.gif"'>
<input type=submit>
</form>
用form.fileInput.click()这个方法的时候可以打开一个打开文件的对话框。但选择文件之后提交就会出错!不知为什么!
那么,有特殊用心的服务器,就可以利用它来设置初值,然后在浏览它的用户看到显示的页面的同时,就可以把这个文件提交到服务器上,这就是所谓的本地文件的极度不安全性了!!(特别的,别人把你的那些敏感的文件上传的话)
这样的事情,作为浏览器是不可能允许的,即使可以,也就有上边提到的权限提示,要不,补丁跟着就会出来的。
绝对要经过用户的交互才行!
按照孟子E章说的,我可以把file按钮的display设置成none,另外加一个img,调用file的onclick,可是form提交的时候报告“拒绝访问”
Sorry, I can't use chinput in my Linux now.
now I'm in windows