Get the Computer Name Using JavascriptJquery - Stack Overflow

I want to get the puter name using jquery. I tried using ActiveX Object but it will only run on IE brow

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
 |  Show 1 more ment

2 Answers 2

Reset to default 3

You 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.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745233712a4617789.html

相关推荐

  • Get the Computer Name Using JavascriptJquery - Stack Overflow

    I want to get the puter name using jquery. I tried using ActiveX Object but it will only run on IE brow

    5小时前
    10

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信