Return to Snippet

Revision: 25941
at April 14, 2010 10:34 by BenClayton


Initial Code
var url = "http://example.com/a/b/fish.html";
url.substring( 0, url.lastIndexOf("/") );

// returns http://example.com/a/b

Initial URL

                                

Initial Description

                                

Initial Title
Javascript: Find directory of file

Initial Tags

                                

Initial Language
JavaScript