Get current dir in javascript

is there a funtion for this? the file is going to be run locally