只有在客户端的安全级别设置得足够低才有可能这样做,不然太危险了

解决方案 »

  1.   

    這個涉及到安全性問題,在客戶端很不好做,建議你讓用戶上傳到服務器去處理
      

  2.   

    只对客户端单独存在的html才可以这么做。<title>动态加载文件</title>
    <form name=form>
    <input type=file name=file>
    <input type=button value=装入 onClick="document.frames.xxx.location = document.form.file.value">
    <textarea name=text cols=60 rows=10></textarea>
    <iframe name=xxx src="" style="display:none" onLoad="document.form.text.value = document.frames.xxx.document.body.innerText"></iframe>
    </form>
      

  3.   

    最好不要这样做,只有IE的安全性是最低的时候才能被允许,最好在服务端操作
      

  4.   

    谢谢大家先,我就是在服务器上录入数据,不是在客户端,能给源程序嘛?