//<hostname>:<port>/<pathname><search><hash>
<script>$(document).ready(function () {
var hostname = window.location.hostname;
var port = window.location.port;
var pathname = window.location.pathname;
var search = window.location.search;
var hash = window.location.hash;
});
</script>
In this process you can get all value of url into javascript .
IF you have any query then comment on it .