javascript - jQuery read title with $.get page -
i title witch included in other page (on same domain).
on moment, following code isn't working:
$.get("/example.html", function(html){ alert($(html).attr('title')); }); content of example.html page is:
<html> <head> <title>foo</title> </head> ... </html>
you can use filter() @ context filter out title tag,
alert($(html).filter("title").text()); and use .text() extract text content.
Comments
Post a Comment