the value of file input is readonly

解决方案 »

  1.   

    换个思路<FORM name=form1>
    <input type="file" name=f><input type=button value=reset onclick="form1.f.outerHTML='<input type=\'file\' name=\'f\'>'">
    </FORM>
      

  2.   

    <FORM name=form1>
    <input>
    <input type="file" name=f>
    <input type=button value=reset onclick="f.select();document.execCommand('delete')">
    </FORM>
      

  3.   

    自己模拟一个:<input type=file id=meizz style="display: none" onPropertyChange="document.all.ff.value=this.value">
    <input name=ff readonly><input type=button value=选择文件 onclick="document.all.meizz.click()">
     这个是“梅花雨”大侠的代码,
     俺觉得可以试一试。