动态获取html页面的内容,而且取当中的某块元素的方法
2017-07-28 17:43
302 查看
$.ajax({
url: "http://192.168.1.59:8888/app-tpl-webapp/tpl/design.html",
async:false,
type:'post',
dataType:'html',
success:function(data) {
console.log("-------------------------------------------------");
var htmlTextText = $('div').html(data);
console.log($('div').html(data).eq(1).find("#workspace-body"));
$('div').html(data).eq(1).find("link,script,style").each(function(index,domEle){
//$("head").append($(domEle));
console.log(domEle);
});
console.log("-------------------------------------------------");
//自己主动为布局文件的html中加上id
}
});
url: "http://192.168.1.59:8888/app-tpl-webapp/tpl/design.html",
async:false,
type:'post',
dataType:'html',
success:function(data) {
console.log("-------------------------------------------------");
var htmlTextText = $('div').html(data);
console.log($('div').html(data).eq(1).find("#workspace-body"));
$('div').html(data).eq(1).find("link,script,style").each(function(index,domEle){
//$("head").append($(domEle));
console.log(domEle);
});
console.log("-------------------------------------------------");
//自己主动为布局文件的html中加上id
}
});
相关文章推荐
- 动态获取html页面的内容,并且取其中的某块元素的方法
- 动态获取html页面的内容,并且取其中的某块元素的方法
- 获取WebView加载HTML时网页中的内容 获取页面元素
- 用Request方法从页面得到Html内容时的处理 及 iframe中控件内容的获取
- 获取Html页面元素属性内容
- struts2的XML配置、动态方法调用、获取页面表单元素的方法
- 获取iframe中的内容、查找获取指定元素(关于用c++调用WEBBROWSER控件,使用相关接口操作web页面元素的一些方法)
- 关于jquery html()方法获取带有OBJECT标签的元素内容时,出现“类型不匹配。”的解决办法
- OC中获取任意结构数组的所有元素内容方法
- Jquery取得iframe中元素的几种方法Javascript Jquery获取Iframe的元素、内容或者ID,反之也行!
- JavaScript动态改变HTML页面元素例如添加或删除
- Javascript获取Html界面元素的几种方法
- 静态页面html、shtml增加动态内容 使用apache ssi
- (转)获取HTML页面内容后格式化显示的办法
- Android ios获取html页面的标签内容
- jQuery 获取、设置HTML或TEXT内容的两种方法
- 2013-6-28-2-服务端获取客户端html页面内容
- jQuery的ajax表单提交,获取元素内容方法
- 通过html()的方法获取文本内容, form表单组件显示的值与获取到的值不一致的问题
- html超链接href设置技巧和动态创建页面元素技巧