//Getting the name of the File
var url = window.location.pathname;
var filename = url.substring(url.lastIndexOf('/')+1);
//Removing the extension of the file (.html)
var noExtension = filename.substr(0,filename.length-5);
//Converting the %20 in a space
var noSpace = noExtension.replace("%20", " ");
//Adding the FileName to an html tag with the Id
var getName = $("#nameOfheFile").append(noSpace);
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.