Want to read the key value from File properties

I have a properties file, now using javascript code I want to read the key value from the properties file.

+4
source share
3 answers

If we are talking about reading a local javascript file from a web browser, you cannot do this due to security restrictions. Javascript, on the other hand, can read a remote file from a website using various methods (e.g. AJAX).

0
source

Take a look at this jquery plugin: http://code.google.com/p/jquery-i18n-properties/

0
source

You can use jQuery. Your properties file may be in JSON format. Then you can use this:

jQuery.getJSON( your_properties_file_url ); 
-1
source

Source: https://habr.com/ru/post/1400965/


All Articles