如何在java script / jsp中查找客户端计算机名? [英] How to find client computer name in java script/jsp?

查看:85
本文介绍了如何在java script / jsp中查找客户端计算机名?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的打印应用程序必须获取客户端名称,然后打印文档。如何在java脚本或jsp中找到它?我在这里搜索有人正在讨论PHP等等吗?
有关运行安全applet以获取客户端计算机名称的讨论?如果是这样,请举个例子来做到这一点?
感谢所有

My print application has to get the client name and then print the documents. How to find this in java script or jsp? I searched here. Some are discussing on PHP and so? Something discussed about running secure applet to get the client computer name? If so please give me example to do that? Thanks to all

推荐答案

你不能用Javascript做到这一点。尝试构建Java applet并:

You can't do it with Javascript. Try building a Java applet and:

java.net.InetAddress i = java.net.InetAddress.getLocalHost();
System.out.println(i.getHostName());

这篇关于如何在java script / jsp中查找客户端计算机名?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆