Click here to Skip to main content
15,915,832 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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
Posted

1 solution

Try below code

var req = new XMLHttpRequest();
req.open('GET', document.location, false);
req.send(null);
var headers = req.getAllResponseHeaders().toLowerCase();
alert(headers);
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900