How to pick the physical path of the html file.

I have a file a.htm on desktop.When i click it it gets opened.How can i get the physical path
of a.htm
searchsanjaysharmaAsked:
Who is Participating?
 
leakim971Connect With a Mentor PluritechnicianCommented:
test :
<html><head>
<script>
var path = location.href.split("/").slice(0,-1).join("/");
alert(path);
</script>
</head><body></body></html>

Open in new window

0
 
plusone3055Commented:
right click and select properties  the phytical path is right there :)
0
 
plusone3055Commented:
right click and select properties  the phytical path is Loacation see attached photo
photo.JPG
0
 
leakim971PluritechnicianCommented:
try :

location.href to get the full path
or :
location.pathname
or :
location.href.split("/").slice(0,-1).join("/")
0
 
searchsanjaysharmaAuthor Commented:
ok
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.