How to access properties file using javascript. Typically, a property file is an xml-based file. I open access to the properties file as follows:
Properties prop = new Properties(); fis = getClass().getResourceAsStream("props.xml"); if (fis != null) { prop.loadFromXML(fis); } String dbUrl = prop.getProperty("dburl");
I want to do the same, but using javascript. is there any way to do this?
JavaScript cannot upload files as part of its security model. It can retrieve XML from the server using AJAX, but it cannot read files from the client computer.
You cannot download files from a user's computer using javascript in a browser.
, , ajax, XMLHttpRequest.
Javascript , javascript, html, XMLHTTPRequest .
, , , , , .
, , , , .
Javascript java, , javascript , -, , .
Javascript , script, .
javascript, .
HTML5 JavaScript File API:
http://www.html5rocks.com/en/tutorials/file/dndfiles/
Source: https://habr.com/ru/post/1718673/More articles:Как я могу подавить пустые ведущие поля в Perl split()? - splitIdeas for a distributed processing project? - distributedHow to draw in contentView UITableViewCell? - iphoneWill "long i = 1;" cause implicit type conversion in C? - cСамая быстрая альтернатива Datatable.Select() для сужения кэшированных данных? - cachingCreate a macro to create a custom show in Powerpoint - powerpoint-vbaDoes Linq to Entities 4.0 have Fulltext features? - c #FormView.FindControl (): object reference error - c #Windows Azure Set up a walkthrough (preferably a dummy guide)? - windowsPHP framework for developing .mobi sites - phpAll Articles