Get Current Page Url using jQuery
Live Demo
Download Script
Need library file to perform empty action.Please copy and Paste below library file.
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js"></script>
Please share your comments and feedback.Thanks.Please subscribe my updates via email.
Need library file to perform empty action.Please copy and Paste below library file.
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js"></script>
jQuery Function
<script type="text/javascript">
$(function () {
var url = $(location).attr('href');
var title= $(this).attr('title');
$('#title').html('<strong>' + title + '</strong>');
$('#url').html('<strong>' + url + '</strong>');
});
</script>
$(function () {
var url = $(location).attr('href');
var title= $(this).attr('title');
$('#title').html('<strong>' + title + '</strong>');
$('#url').html('<strong>' + url + '</strong>');
});
</script>
HTML
<p>Current page URL: <span id="url"></span></p>
<p>Current page title: <span id="title"></span></p>
<p>Current page title: <span id="title"></span></p>
No comments:
Post a Comment