Wednesday, October 20, 2010

Get Current Page Name In Javascript

<script type="text/javascript">

var sPath = window.location.pathname;

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

alert(sPage);

</script>

No comments:

Post a Comment