是否可以访问html文件中的环境变量? [英] Is it possible to access environment variables in html file?

查看:110
本文介绍了是否可以访问html文件中的环境变量?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只是想知道我是否访问系统变量(例如PATH设置或其他环境变量)并使用html页面显示它!是否可以?还是有什么方法可以达到这个目的?
很久以来我一直在想这个问题!

I was just wondering if i access system variables (like PATH settings or other environment variables) and display it using html page! Is it possible? Or is there any methos to acheive this?
I have been wondering about this from a long time!

推荐答案

不,您不能.HTML5本身只是Web内容的标记语言.它没有活动的组件.

No, you can't. HTML5 itself is just a markup language for web content. It has no active components.

您可能会假设新的Javascript功能中可能存在某些错误地归类为HTML5的标签(在我看来,HTML5通常应该被宣传为Javascript 5,因为它的大多数功能都适合Javascript程序员使用)比纯网页设计师更合适).但是我也不得不让你失望.

You likely assume that there might be something among the new Javascript features which are incorrectly grouped under the label HTML5 (it often seems to me like HTML5 should rather be advertised as Javascript 5, because most of its features are rather for Javascript programmers than for pure webdesigners). But I also have to disappoint you there.

在Web应用程序的上下文中,从用户系统读取环境变量几乎没有或没有有用的应用程序,但是有大量滥用的可能性.它可以用来给用户添加指纹,收集敏感信息,并可以与其他攻击结合使用,以更好地针对他们.据我所知,W3C从未推荐过这样做的API.

Reading environment variables from the users system has little to no useful application in the context of web applications, but plenty of abuse potential. It could be used to fingerprint the user, collect sensitive information and could be used in conjecture with other exploits to better target them. So no API for doing that was ever recommended by the W3C as far as I know.

这篇关于是否可以访问html文件中的环境变量?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆