Script Categories

Menus and Navigation >>> Current Directory.

Takes the user to a directory listing of all files in the current directory. Or, if an index.html file exists in that directory, they are taken to that page instead.

Add the below code to the <body> section of your page:

<script language="javascript" type="text/javascript">
/* Visit for full source code
and get more free JavaScript, CSS and DHTML scripts! */
<!-- Begin
var myloc = window.location.href;
var locarray = myloc.split("/");
delete locarray[(locarray.length-1)];
var arraytext = locarray.join("/");
//  End -->
type=button value="Show Current Directory Listing (Or Index.html Page)" onClick="window.location=arraytext;">

JavaScript Editor Get Advanced
JavaScript and Ajax Editor,
Validator and Debugger!

1st JavaScript Editor.

Code was highlighted by 1st JavaScript Editor (The Best JavaScript Editor!).