zoukankan      html  css  js  c++  java
  • 上传文件 获取路径

     <input name="fdxml" id="upload" type="file" />

    1一开始获取C:fakepathdoc.xml 实际路径:D:xmldoc.xml

    设置浏览器获取到实际路径:interneter选项--安全-自定义级别—启用-将文件上传时包含本地路径

    区分浏览器

      if (obj) {                 var file_up = document.getElementById('upload');                    

    //ie                 if (window.navigator.userAgent.indexOf("MSIE") >= 1) {                                         

    file_up.select();

                            var realpath = document.selection.createRange().text;

                                          }                    

    //firefox                     else if (window.navigator.userAgent.indexOf("Firefox") >= 1) {                     

        if (file_up.files) {                          

       return file_up.files.item(0).getAsDataURL();                        

    }                         return file_up.value;            

             }                             

          }

  • 相关阅读:
    CMMI全称是Capability Maturity Model Integration,即能力成熟度模型集成
    【beta】Scrum站立会议第5次....11.7
    【beta】Scrum站立会议第3次....11.6
    补交进度条
    【beta】Scrum站立会议第1次....11.3
    【week7】psp
    【week6】psp
    【week6】约跑App视频链接
    【week6】团队贡献分
    【week6】用户数
  • 原文地址:https://www.cnblogs.com/Ilin631/p/3311788.html
Copyright © 2011-2022 走看看