Skip to main content
Stack Overflow
  1. About
  2. For Teams

Return to Answer

Post Timeline

Edit: edit! ಠ_ಠ
Source Link
Matt Ball
  • 361k
  • 102
  • 655
  • 725

Short answer: No.

Long answer: Maybe. If you mean system environment variables, there isn't (that I'm aware of) any way to do that via straight JavaScript. You can access a number of system information through JavaScript though. Check this page out for some examples:

http://www.docsteve.com/DocSteve/Samples/JS/javascript_env.html

This shows how to get the underlying OS/platform, Depending on exactly what you're looking for, this may not work. It's possible via other methods, like creating an ActiveX object and using that. However, this requires additional steps on the user end (like installing/authorizing ActiveX).

I think this is a security feature, separating the system from the browser, therefore it can be difficult (or impossible, depending on your requirements).

(Edit: First answer!)

Short answer: No.

Long answer: Maybe. If you mean system environment variables, there isn't (that I'm aware of) any way to do that via straight JavaScript. You can access a number of system information through JavaScript though. Check this page out for some examples:

http://www.docsteve.com/DocSteve/Samples/JS/javascript_env.html

This shows how to get the underlying OS/platform, Depending on exactly what you're looking for, this may not work. It's possible via other methods, like creating an ActiveX object and using that. However, this requires additional steps on the user end (like installing/authorizing ActiveX).

I think this is a security feature, separating the system from the browser, therefore it can be difficult (or impossible, depending on your requirements).

(Edit: First answer!)

Short answer: No.

Long answer: Maybe. If you mean system environment variables, there isn't (that I'm aware of) any way to do that via straight JavaScript. You can access a number of system information through JavaScript though. Check this page out for some examples:

http://www.docsteve.com/DocSteve/Samples/JS/javascript_env.html

This shows how to get the underlying OS/platform, Depending on exactly what you're looking for, this may not work. It's possible via other methods, like creating an ActiveX object and using that. However, this requires additional steps on the user end (like installing/authorizing ActiveX).

I think this is a security feature, separating the system from the browser, therefore it can be difficult (or impossible, depending on your requirements).

Source Link
Josh
  • 7.5k
  • 8
  • 48
  • 68

Short answer: No.

Long answer: Maybe. If you mean system environment variables, there isn't (that I'm aware of) any way to do that via straight JavaScript. You can access a number of system information through JavaScript though. Check this page out for some examples:

http://www.docsteve.com/DocSteve/Samples/JS/javascript_env.html

This shows how to get the underlying OS/platform, Depending on exactly what you're looking for, this may not work. It's possible via other methods, like creating an ActiveX object and using that. However, this requires additional steps on the user end (like installing/authorizing ActiveX).

I think this is a security feature, separating the system from the browser, therefore it can be difficult (or impossible, depending on your requirements).

(Edit: First answer!)

lang-js

AltStyle によって変換されたページ (->オリジナル) /