Javascript display current directiory |
Javascript display current directiory |
tk=lm2408 |
Feb 7 2017, 05:43 AM
Post
#1
|
Newbie Group: Members Posts: 19 Joined: 31-January 17 Member No.: 26,289 |
Hi,
I'm trying to list the current directory that the current page is located in. I have it working except it displays %20 instead of a space in the directory name. The code I have is: CODE var path = document.location.pathname; var dir = path.substring(path.indexOf('DIRLISTTEST/', 1), path.lastIndexOf('/')); document.write(dir); Can anyone help? Thank you for your time Greg |
Lo-Fi Version | Time is now: 25th April 2024 - 11:00 AM |