Following is the script which will get the page name from URL.
<script language="javascript">
var URL = window.location.pathname;
var PageName = URL.substring(URL.lastIndexOf('/') + 1);
alert(PageName);
</script>
Output

Download
PageName_URL.zip (749.00 bytes)
Live Demo