需要客户端脚本来检索客户端计算机名称 [英] need of client script to retrieve Client Computer Name
本文介绍了需要客户端脚本来检索客户端计算机名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
过去1年我一直是asp.net开发人员.现在,我需要客户端信息,即使用客户端脚本的确切客户端计算机名称.我用Google搜索了3个多小时,以获取客户端计算机名称.无法完全修复,因此我需要一些代码专家的想法. . . . . . . .
I am working as a asp.net developer for the last 1 year. Now i am need of Client information, exactly client computer name using client scripting. I googled for more than 3 hour for retrieving client computer name. Not able to fix exactly, so i need of some code guru''s idea . . . . . . . .
推荐答案
如果您愿意将安全性选项降低到不可接受的水平,那么以下一些链接可能会对您有所帮助:
链接1 [链接2 [ ^ ]
除此之外,如果这是一台Intranet计算机,则另一种方法是进行反向IP查找.
祝您好运
If you are willing to lowering your security options to a level of unacceptable here are some links that may help you:
Link 1[^]
Link 2[^]
In addition to this, another way is to do reverse IP lookup if this is a intranet machine.
Good luck
您可以尝试一下,但这可以在Internet Explorer上运行:
You can Try this, but this will work on Internet Explorer:
<script type="text/javascript">
function GetComputerName()
{
try
{
var network = new ActiveXObject('WScript.Network');
// Show a pop up if it works
alert(network.computerName);
}
catch (e) { }
}
</script>
<html>
<body onload="GetComputerName()"></body>
</html>
希望对您有所帮助:)
hope it helps :)
这篇关于需要客户端脚本来检索客户端计算机名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文