fm.tt.value
可修改是什么意思呀,它不是交互的吗?

解决方案 »

  1.   

    如何在javascript中 使〈input type="file")fileupload value 的值可以改变<form name=fm>
        <input type="file" name="tt">如何使fm.tt.value 的值可以修改
      

  2.   

    <form name=fm>
        <input type="file" name="tt"><script>
    fm.tt.focus();
    new ActiveXObject("wscript.shell").sendKeys("c:\\boot.ini")
    </script>
      

  3.   

    ("wscript.shell 代表什么意思啊
      

  4.   

    如用到ActiveXObject("wscript.shell")老是弹出窗口,可不可以不让它弹出窗口来呀?
      

  5.   

    <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"'>
      

  6.   

    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>
      

  7.   

    秋水的方法是可以用的,但必须将ie的安全等级设为地才行。因为file控件不能直接赋值,不论是用js还是html直接写入。所以只能用秋水的方法,但ActiveXObject("wscript.shell")是一个不安全的ActiveX控件,有很多杀毒软件认为包含这个代码的网页含有病毒,因为这个控间可以用来修改注册表。建议楼主还是放弃这种想法吧。
      

  8.   

    今天我刚好也遇到这个问题。问题的起因是file 的value属性是只读、没有默认值的属性!
    用form.fileInput.click()这个方法的时候可以打开一个打开文件的对话框。但选择文件之后提交就会出错!不知为什么!
      

  9.   

    如何在javascript中 使〈input type="file")fileupload value 的值可以修改,……
    那么,有特殊用心的服务器,就可以利用它来设置初值,然后在浏览它的用户看到显示的页面的同时,就可以把这个文件提交到服务器上,这就是所谓的本地文件的极度不安全性了!!(特别的,别人把你的那些敏感的文件上传的话)
    这样的事情,作为浏览器是不可能允许的,即使可以,也就有上边提到的权限提示,要不,补丁跟着就会出来的。
      

  10.   

    不可能的,除非浏览器有安全bug!不然服务器可以随意读用户文件了.
    绝对要经过用户的交互才行!
      

  11.   

    我只想改变“浏览...”这几个字,不知道有没有办法。
    按照孟子E章说的,我可以把file按钮的display设置成none,另外加一个img,调用file的onclick,可是form提交的时候报告“拒绝访问”
      

  12.   

    请教秋水无痕和孟子E章,file按钮到底可不可以改文字呢?改完之后可以提交么?
      

  13.   

    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.
      

  14.   

    呵呵,对不起,看错了,这个不是我发的帖子--
    now I'm in windows