javascript is not giving the computer name

末鹿安然 提交于 2019-12-02 03:56:34

问题


I am Trying to Get the Client Computer name using javascript like this

<script language="javascript" type="text/javascript">
        function GetComputerName() {
            try {
                var network = new ActiveXObject('WScript.Network');
                alert(network.computerName);
            }
            catch (e) {
                alert('a');
            }
        }
    </script>

But this is not returning any thing else exception.Plz Help me to find out the client computer name in Javascript.

来源:https://stackoverflow.com/questions/14579752/javascript-is-not-giving-the-computer-name

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!