如何获取html文件作为对象
How to GET html file as object?
我尝试将html文件作为对象而不是SWF文件,但我真的无法弄清楚。有人知道该怎么做吗?这是我的请求函数:
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 );
}
}
我不完全明白你的要求,但如果你想将HTML页面作为一个对象,你可以尝试:
var x = document.documentElement
相关文章:
- 仅使用文件对象选择单个文件
- S3文件上传文件对象使用节点js
- 如何打开文件对象(HTML)并在谷歌应用程序脚本中解析它
- Grunt 可以直接从文件对象/数组或 glob 中的“src”值通过 HTTP 加载远程文件
- 如何使用springmvc控制器通过ajax sumbit传递文件对象
- Javascript;HTML文件API-基于文件对象的javascript对象是否仍然包含文件'的位置
- 如何获取上传的SVG文件对象的内容
- 存储/检索 html 5 文件对象,用于恢复损坏的文件上传
- 在浏览器上传后操作文件对象的正文
- 如何将 Base64 字符串转换为 javascript 文件对象,就像从文件输入表单一样
- 将图像对象转换为文件对象,javascript
- 覆盖 JavaScript 文件对象
- 如何将 Javascript 文件对象 + 数据发送到 MVC 6 控制器 - ASP.NET 5.
- 如何将图像源绑定到角度文件对象
- 如何使用angularjs或jquery将每个点击的按钮操作保存在json文件/对象中
- 通过在javascript中提供硬编码路径来获取文件对象
- 文件对象错误
- 将文件对象从Javascript传递到Web API
- 如何从phonegap的html5输入字段文件对象获取路径
- 在以下场景中,如何使代码可用于多个文件文件对象