Get page name from url in javascript.
var url = window.location.pathname;
var myPageName = url.substring(url.lastIndexOf('/') + 1);
alert(myPageName);
So this is the way to get page name from url in javascript
Source Code examples, error solution in Programming & learn online .Net, C, Java, C#, c++, basic of language, sql server , Ajax, Crystal Report, Html.
var url = window.location.pathname;
var myPageName = url.substring(url.lastIndexOf('/') + 1);
alert(myPageName);
So this is the way to get page name from url in javascript
0 comments:
Post a Comment