久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

      <bdo id='h88jM'></bdo><ul id='h88jM'></ul>
    <tfoot id='h88jM'></tfoot>

      <small id='h88jM'></small><noframes id='h88jM'>

    1. <i id='h88jM'><tr id='h88jM'><dt id='h88jM'><q id='h88jM'><span id='h88jM'><b id='h88jM'><form id='h88jM'><ins id='h88jM'></ins><ul id='h88jM'></ul><sub id='h88jM'></sub></form><legend id='h88jM'></legend><bdo id='h88jM'><pre id='h88jM'><center id='h88jM'></center></pre></bdo></b><th id='h88jM'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='h88jM'><tfoot id='h88jM'></tfoot><dl id='h88jM'><fieldset id='h88jM'></fieldset></dl></div>
        <legend id='h88jM'><style id='h88jM'><dir id='h88jM'><q id='h88jM'></q></dir></style></legend>

      1. IE8/9 中的表單數(shù)據(jù)

        FormData in IE8/9(IE8/9 中的表單數(shù)據(jù))
          <tbody id='eGmfA'></tbody>

            <small id='eGmfA'></small><noframes id='eGmfA'>

          • <i id='eGmfA'><tr id='eGmfA'><dt id='eGmfA'><q id='eGmfA'><span id='eGmfA'><b id='eGmfA'><form id='eGmfA'><ins id='eGmfA'></ins><ul id='eGmfA'></ul><sub id='eGmfA'></sub></form><legend id='eGmfA'></legend><bdo id='eGmfA'><pre id='eGmfA'><center id='eGmfA'></center></pre></bdo></b><th id='eGmfA'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='eGmfA'><tfoot id='eGmfA'></tfoot><dl id='eGmfA'><fieldset id='eGmfA'></fieldset></dl></div>
            • <bdo id='eGmfA'></bdo><ul id='eGmfA'></ul>

              <legend id='eGmfA'><style id='eGmfA'><dir id='eGmfA'><q id='eGmfA'></q></dir></style></legend>
            • <tfoot id='eGmfA'></tfoot>

                  本文介紹了IE8/9 中的表單數(shù)據(jù)的處理方法,對(duì)大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                  問題描述

                  我已經(jīng)實(shí)現(xiàn)了這個(gè)使用 ajax 上傳文件的腳本,它在除資源管理器之外的其他瀏覽器中完美運(yùn)行,我注意到 IE9 和更少不支持 formData,在 IE 中有沒有 formData 的替代品,我想使用干凈javascript

                  i have implemented this script for uploading files with ajax, it works perfect in other browsers except for explorer, i noticed that formData is not supported by IE9 and less, are there any alternatives for formData in IE, and i want use clean javascript

                      function doObjUploadExplorer(url, lnk_id, file, progress, success, content, frm, div_dlg, start_func){
                      var file_input = null,
                        frm_data = new FormData(),
                        req;
                  
                      try {
                          //firefox, chrome, safari etc
                          req = new XMLHttpRequest();
                      }
                  
                      catch (e) {
                          // Internet Explorer Browsers
                          req = new ActiveXObject("Microsoft.XMLHTTP");
                      }
                  
                  
                  if (document.getElementById(file)) {
                      file_input = document.getElementById(file);
                  
                      for (var i = 0; i < file_input.files.length; ++i) {
                          frm_data.append(file, file_input.files[i]);
                      }
                  }
                  
                  req.upload.addEventListener('progress', function(e) {  //Event called while upload is in progress
                      if (progress !== undefined
                              && e.lengthComputable) {
                          $('#' + progress).html('<font>Uploading... ' + Math.round((e.loaded / e.total) * 100) + '%</font>');
                      }
                  });
                  
                  req.upload.addEventListener('load', function(e) {  //Event called when upload is completed
                      $('#' + progress).html('<font>Retrieving updated data...</font>');
                  });
                  
                  req.upload.addEventListener('error', function(e) {  //Event called when an error is returned by the server
                      alert('An error has occurred...');
                  });
                  
                  req.addEventListener('readystatechange', function(e) {        
                      if (this.readyState === 4) {
                          if (this.status === 200) {
                              if (content !== undefined) {
                                  $('#' + content).html(this.response);
                              }
                  
                              if (success !== undefined) {
                                  showChkMark(success);
                              }
                          } else {
                              console.log('Server replied with HTTP status: ' + this.status);
                          }
                  
                  
                          if (progress !== undefined) {
                              $('#' + progress).hide();
                          }
                  
                          if (div_dlg !== undefined) {
                              $('#' + div_dlg).dialog('close');
                          }
                  
                          $('#' + file)
                          .attr('disabled', false)
                          .val('');
                      }
                  });
                  
                  if (progress !== undefined) {
                      $('#' + progress).show();
                  }
                  
                  $('#' + file).attr('disabled', true);
                  url += (
                          url.indexOf('?') === -1
                          ? '?'
                          : '&'
                      );
                  url += 'lnk_id=' + lnk_id + '&file=' + file;
                  req.open('POST', url);
                  req.setRequestHeader('Cache-Control', 'no-cache');
                  
                  if (start_func !== undefined) {
                      start_func.apply();
                      setTimeout(function() {
                          req.send(frm_data);
                      }, 500);
                  } else {
                      req.send(frm_data);
                  }}
                  

                  推薦答案

                  IE 中的 FormData 僅支持 IE10,經(jīng)過研究(我認(rèn)為)最好的解決方案是使用 ajaxForm:http://malsup.com/jquery/form/ 在 IE8/9 中完美運(yùn)行,不確定 IE7

                  FormData in IE is only supported from IE10, after doing some research the best solution for this (my opinion) would be using ajaxForm: http://malsup.com/jquery/form/ works perfect in IE8/9, not sure about IE7

                  這篇關(guān)于IE8/9 中的表單數(shù)據(jù)的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

                  【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請(qǐng)聯(lián)系我們刪除處理,感謝您的支持!

                  相關(guān)文檔推薦

                  Browser waits for ajax call to complete even after abort has been called (jQuery)(即使在調(diào)用 abort (jQuery) 之后,瀏覽器也會(huì)等待 ajax 調(diào)用完成)
                  JavaScript innerHTML is not working for IE?(JavaScript innerHTML 不適用于 IE?)
                  XMLHttpRequest cannot load, No #39;Access-Control-Allow-Origin#39; header is present on the requested resource(XMLHttpRequest 無法加載,請(qǐng)求的資源上不存在“Access-Control-Allow-Origin標(biāo)頭) - IT屋-程序員軟件開發(fā)技術(shù)分
                  Is it possible for XHR HEAD requests to not follow redirects (301 302)(XHR HEAD 請(qǐng)求是否有可能不遵循重定向 (301 302))
                  NETWORK_ERROR: XMLHttpRequest Exception 101(NETWORK_ERROR:XMLHttpRequest 異常 101)
                  XMLHttpRequest 206 Partial Content(XMLHttpRequest 206 部分內(nèi)容)

                    <tfoot id='pk6I0'></tfoot>
                        <bdo id='pk6I0'></bdo><ul id='pk6I0'></ul>

                          <small id='pk6I0'></small><noframes id='pk6I0'>

                          <i id='pk6I0'><tr id='pk6I0'><dt id='pk6I0'><q id='pk6I0'><span id='pk6I0'><b id='pk6I0'><form id='pk6I0'><ins id='pk6I0'></ins><ul id='pk6I0'></ul><sub id='pk6I0'></sub></form><legend id='pk6I0'></legend><bdo id='pk6I0'><pre id='pk6I0'><center id='pk6I0'></center></pre></bdo></b><th id='pk6I0'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='pk6I0'><tfoot id='pk6I0'></tfoot><dl id='pk6I0'><fieldset id='pk6I0'></fieldset></dl></div>
                          • <legend id='pk6I0'><style id='pk6I0'><dir id='pk6I0'><q id='pk6I0'></q></dir></style></legend>
                              <tbody id='pk6I0'></tbody>
                            主站蜘蛛池模板: 亚洲视频国产视频 | 一区二区三区中文字幕 | 国产在视频一区二区三区吞精 | 热久久性 | 国产在线观 | 黄色毛片免费视频 | 国产亚洲一区二区三区 | 色婷婷综合网 | 中文字幕一区二区三区乱码在线 | 国产一级片网站 | 精品久久久久久久人人人人传媒 | 欧美视频一区二区三区 | 成人国产在线视频 | 欧美第一区 | 成人免费视频 | 中文字幕不卡在线观看 | 精品欧美一区二区三区久久久 | 久久久久网站 | 日韩字幕一区 | 亚洲视频在线看 | 国产欧美精品区一区二区三区 | 99福利视频 | 365夜爽爽欧美性午夜免费视频 | 日韩精品一区二区三区视频播放 | 日韩a视频 | 国产一区免费 | 国产成人区 | 中午字幕在线观看 | 日韩国产中文字幕 | 户外露出一区二区三区 | 欧美在线 | 亚洲免费三级 | 国产精品久久久久久久久婷婷 | 欧美一区2区三区4区公司 | 成人精品一区二区三区中文字幕 | 99在线观看视频 | 一区二区三区精品在线 | 欧美精品在线一区 | 韩日一区二区三区 | 成人婷婷| 六月色婷|