javascript detectar la pagina

JavaScript
var URLactual = window.location;
alert(URLactual);var URLactual = jQuery(location).attr('href');
Source

Also in JavaScript: