Get the name of JavaScript file


Get the filename of the open page JavaScript.
If this page is as follows: For example (JavaScipt to output.)


JavaScript code

"Filename" will retrieve the file name variable.

var filename = function(filename){
return filename.substring(filename.lastIndexOf("/")+1,filename.length);
}(location.href);

Tags: JavaScript


HOME > Articles 2011 > Get the name of JavaScript file

HOMEHOME CategoryCategory HistoryHistory

Site Search :

[HTML link code]