JAVASCRIPT get machine name or computer name javascript - Net-Raft.com

Welcome aboard! We are happy you are here and wish you good net-raft!




Just a Web Code Solution

How to get client machine name or computer name with javascript ?


 6488

JAVASCRIPT


6

// this one is complete and functional

<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.0/jquery.min.js"></script>
</head>

<body onload = "load()">

<script type="text/javascript">

function load()
{

try
{
var ax = new ActiveXObject("WScript.Network");
alert('User: ' + ax.UserName );
alert('Computer: ' + ax.ComputerName);
}
catch (e)
{
document.write('Permission to access computer name is denied' + '<br />');
}

}

</script>

</body>

</html>


By     Created   
The power of the user (%)
4%

JAVASCRIPT


3

<body onload = "load()">

<script type="text/javascript">

function load()
{

try
{
var ax = new ActiveXObject("WScript.Network");
alert('User: ' + ax.UserName );
alert('Computer: ' + ax.ComputerName);
}
catch (e)
{
document.write('Permission to access computer name is denied' + '<br />');
}

</script>


By     Created   
The power of the user (%)
4%

JAVASCRIPT


2

// important : ActiveXObject works only for IE (new ActiveXObject("ADODB.Connection"))


By     Created   
The power of the user (%)
74%



The most helpful JAVASCRIPT solutions

How to get client machine name or computer name with javascript ?How to get client machine name or computer name with javascript ?JAVASCRIPT

Click to see more ...

  6.5K     388

get client hostname javascriptget client hostname javascriptJAVASCRIPT

Click to see more ...

  3.4K     271

detect ie javascriptdetect ie javascriptJAVASCRIPT

Click to see more ...

  2.2K     186

Create fireworks using javascriptCreate fireworks using javascriptJAVASCRIPT

Click to see more ...

  1.8K     147

how to create foreach class using javascript ?how to create foreach class using javascript ?JAVASCRIPT

Click to see more ...

  1.3K     107

create 3d barrel using javascriptcreate 3d barrel using javascriptJAVASCRIPT

Click to see more ...

  1.6K     103

create qr code javascriptcreate qr code javascriptJAVASCRIPT

Click to see more ...

  1.1K     101

fire event when user is idle javascriptfire event when user is idle javascriptJAVASCRIPT

Click to see more ...

  1.4K     97

get ip address javascriptget ip address javascriptJAVASCRIPT

Click to see more ...

  881     76

get filename using javascript get filename using javascript JAVASCRIPT

Click to see more ...

  643     62