I have a list of ip addresses to ping and would like to use Java script to do that.
I tried as the following but there is no output when I clicked the "Test" button.
<!DOCTYPE html>
<html>
<head>
<title>Test</title>
<script>
function myFunction()
{
var myStringArray = [ "10.100.200.133", "10.10.22.0" ];
len=myStringArray.length
for (var i=0; len=myStringArray.length; i<len; i++) {
check=ping(i)
if $check Then
document.write("ip"+ i + "is up")
else
document.write("ip"+ i + "is down")
}
}
</script>
</head>
<body>
<button onclick="myFunction()">Test</button>
</body>
</html>