Page Details >>> Page Variable.
Not exactly the most used script, but this one allows you to reference the page name in a variable. Instead of yourdomain.com/index.html, you can use this script to create a variable that stores index.html for your use! You can use it with alerts, document.write, etc.
Add the below code to the <body> section of your page: