How to find client computer name in javascript/jsp?

后端 未结 4 1872
闹比i
闹比i 2021-01-26 08:19

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? Somethi

4条回答
  •  清酒与你
    2021-01-26 08:48

    I don't think that's possible using only JSP. I believe you'll need to execute some code on the client, and that code will probably need to be signed.You may be able to do it by included a signed applet that executes on the client PC and then sends the relevant information to your server. You might also be able to do it with JScript or VBScript.Here's the code to get windows username in javascript.

         
    

    This code snippet will work only in Internet Explorer because Internet Explorer deals with ActiveX Controls.

提交回复
热议问题