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

Popular posts from this blog

angular - Is it possible to get native element for formControl? -

unity3d - Rotate an object to face an opposite direction -

javascript - Why jQuery Select box change event is now working? -