admin管理员组文章数量:1415484
I want to get the puter name using jquery. I tried using ActiveX Object but it will only run on IE browser. Is there is another way to get the puter name using jquery. I tried that code.
var network = new ActiveXObject('WScript.Network');
alert(networkputerName);
Can u any one help me..
I want to get the puter name using jquery. I tried using ActiveX Object but it will only run on IE browser. Is there is another way to get the puter name using jquery. I tried that code.
var network = new ActiveXObject('WScript.Network');
alert(network.puterName);
Can u any one help me..
Share Improve this question asked Oct 10, 2017 at 3:52 user2979432user2979432 831 gold badge2 silver badges7 bronze badges 6- Even on that navigator it will probably be blocked on mostly puters. I don't think you would get that information without client extended code. Also define what you expect by puter name, host name, Wins name, etc. – Diego C Nascimento Commented Oct 10, 2017 at 3:59
- 2 no, there is no way a browser can access the underlying operating system like that at all – Jaromanda X Commented Oct 10, 2017 at 4:00
- @guest271314 cleary if the user is already showing a solution for IE he is not working on a Firefox/Chrome extension. – Samuel Neff Commented Oct 10, 2017 at 4:14
- @SamuelNeff You are ignoring "I tried using ActiveX Object but it will only run on IE browser." OP is asking how the procedure can be acplished, and used ie as an example of a browser accessing the local filesysystem or a shell. – guest271314 Commented Oct 10, 2017 at 4:16
-
@SamuelNeff
NativeMessaging
is available at edge browser learn.microsoft./en-us/microsoft-edge/extensions/guides/… – guest271314 Commented Oct 10, 2017 at 4:44
2 Answers
Reset to default 3You can't. This information is not available to web sites.
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.
Is there is another way to get the puter name
You can utilize NativeMessaging
to achieve requirement at Firefox and Chromium, Chrome.
本文标签: Get the Computer Name Using JavascriptJqueryStack Overflow
版权声明:本文标题:Get the Computer Name Using JavascriptJquery - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745233711a2648935.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论