Quantcast
Channel: IanJGough.com » JavaScript
Viewing all articles
Browse latest Browse all 10

Get the Page Title Description and Url

$
0
0

JQuery version: <script type="text/javascript"> $(document).ready(function () { var pageTitle = $(document).attr('title'); var pageHref = $(location).attr('href'); var pageDescription = $('meta[name=description]').attr("content"); $('#result').html('<a href="' + pageHref + '">' + pageTitle + '</a><br />' + pageDescription + '<br /><span class="green">' + pageHref + '</span>'); }); </script>   Javascript Version: <script type="text/javascript"> var a = (document.title); var b = (document.location.href); …

The post Get the Page Title Description and Url appeared first on IanJGough.com.


Viewing all articles
Browse latest Browse all 10

Trending Articles