2015-06-12 30 views
0

我嘗試獲取HTML文件作爲對象,而不是SWF文件,但我真的無法弄清楚。有沒有人有任何想法如何做到這一點?這是我的請求函數:如何將html文件作爲對象?

function loadFolderStructure(strPath, $currentSelectItem) { 
    if ('undefined' === typeof(fsStructure[strPath])) { 
     $.ajax({ 
      'url'  : '../php/navigator.php', 
      'dataType' : 'json', 
      'data'  : {'tarFolder':strPath}, 

      success : function(respObj, textStatus, jqXHR) { 
       if ('undefined' !== typeof(respObj['status'])) { 
        if ( 
          ('success' === respObj['status']) && 
          ('undefined' !== typeof(respObj['subfolders'])) && 
          ('undefined' !== typeof(respObj['subswfs']))) { 

         processNewDFData(respObj, $currentSelectItem, strPath); 
        } else { 
         alert(conf.messages.bad_response_format); 
        } 
       } else { 
        alert(conf.messages.bad_response_format); 
       } 
      }, 
      error : function(jqXHR, textStatus, errorThrown) { 
       alert(conf.messages.failed_ajax_request); 
      } 
     }); 
    } else { 
     rendSelects($currentSelectItem, strPath); 
    } 
} 

回答

0

我沒有完全理解你問什麼,但如果你想要得到的HTML頁面作爲一個對象,你可以嘗試:

var x = document.documentElement 
+0

要更多指定,這段代碼在文件夾中查找爲././data/,其中有子文件夾,其中可以找到SWF文件和HTML文件。但是,目標SWF文件,我想目標HTML文件 –

+0

對不起,我不能幫你。 –

相關問題