How to separate a string using '\' in javascript. It automatically converts into a escape sequence. Any help please.
Javascript
var str="file_path1\file_path2\file";
var rev=str.split("\");
This doesn't work.
Fiddle: http://jsfiddle.net/ucw28/
ADDITIONAL DETAILS:
I'm uploading a file using input type= file. I want to obtain the file name without using php. And this problem occurred so I cannot escape the slash in the string itself.