且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

使用 Javascript/Jquery 获取计算机名称

更新时间:2023-11-08 23:10:34

你不能.网站无法获得此信息.

You can't. This information is not available to web sites.

您问题中概述的 ActiveX 方法在当前版本的 Internet Explorer 中甚至不起作用,因为 WScript.Network ActiveX 对象未标记为安全的脚本.

The ActiveX approach outlined in your question won't even work in current versions of Internet Explorer, as the WScript.Network ActiveX object is not marked as safe for scripting.