Friday, 29 March 2013

Get 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