采取html页面的头标记内容 [英] taking head tag content of html page
本文介绍了采取html页面的头标记内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嗨所有
i有html页面,我想根据它的名字或网址获得它的标题内容
可以任意请帮助我吗?
谢谢
hi all
i have html page and i want to get head tag content of it according to its name or url
can any one helps me in this , please?
thanks
推荐答案
试试以下代码
var req = new XMLHttpRequest();
req.open(''GET'',document.location,false);
req.send(null);
var headers = req.getAllResponseHeaders()。toLowerCase();
alert(headers);
Try below code
var req = new XMLHttpRequest();
req.open(''GET'', document.location, false);
req.send(null);
var headers = req.getAllResponseHeaders().toLowerCase();
alert(headers);
这篇关于采取html页面的头标记内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文