Tuesday, April 21, 2009

Get the current page name in javascript

<script type="text/javascript">

var sPath = window.location.pathname;

var sPage = sPath.substring(sPath.lastIndexOf('/') + 1);

alert(sPage);

</script>

Reference:

Get the current page name

blog comments powered by Disqus