Reading environment variables with Javascript

前端 未结 6 869
灰色年华
灰色年华 2020-12-10 10:37

I need to read the system time from the environment variables on the client\'s OS. I searched on Stackoverflow and found that this isn\'t possible. However, those answers we

6条回答
  •  难免孤独
    2020-12-10 10:47

    There is only one way to do this - by using special web browser. Something like node-webkit. It integrates webkit engine with node.js, so you can use it together with DOM.

    document.write(require('os').type());
    

    But as everybody else said - there is no chance to do it with "normal" web browser.

提交回复
热议问题