javascript - Reading Local File with Jquery Ajax -
i tried reading local text file javascript(jquery). following code.
$.ajax({ type: 'get', url: 'file:///c:/users/kola/desktop/b/data_file_text', error: function(e) { console.log(e); }, success: function(e) { console.log(e.responsetext); } });
at end of execution, error method triggered. accessing argument(e) returned. got following jquery object.
readystate: 4 responsetext: "my expected data" status: 200 statustext: "ok" ....
why triggered error , seems ok. missing something? thank you.
Comments
Post a Comment