/ Published in: JavaScript
Expand |
Embed | Plain Text
var url = "http://example.com/a/b/fish.html"; url.substring( 0, url.lastIndexOf("/") ); // returns http://example.com/a/b
You need to login to post a comment.
var url = "http://example.com/a/b/fish.html"; url.substring( 0, url.lastIndexOf("/") ); // returns http://example.com/a/b
You need to login to post a comment.