Horje
MAC addresses in JavaScript Code Example
MAC addresses in JavaScript
function showMacAddress() {
    var obj = new ActiveXObject("WbemScripting.SWbemLocator");
    var s = obj.ConnectServer(".");
    var properties = s.ExecQuery("SELECT * FROM Win32_NetworkAdapterConfiguration");
    var e = new Enumerator(properties);
    var output;
    output = '<TABLE class="w3-table w3-striped w3-bordered w3-border w3-white" border="0" cellPadding="5px" cellSpacing="1px" bgColor="#CCCCCC">';
    output = output + '<tr bgColor="#EAEAEA"><td>Caption</td><td>MACAddress</td></tr>';
    while (!e.atEnd()) {
        e.moveNext();
        var p = e.item();
        if (!p) continue;
        output = output + '<tr bgColor="#FFFFFF">';
        output = output + '<td>' + p.Caption; +'</td>';
        output = output + '<td>' + p.MACAddress + '</td>';
        output = output + '</tr>';
    }
    output = output + '</table>';
    document.getElementById("box").innerHTML = output;
}

showMacAddress();




Javascript

Related
wait Code Example wait Code Example
unable to add class in jsx Code Example unable to add class in jsx Code Example
loop through async javascript -IMP Code Example loop through async javascript -IMP Code Example
jquery crud table example Code Example jquery crud table example Code Example
how to make a button execute a javascript function Code Example how to make a button execute a javascript function Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
6