我有一个包含 Javascript 代码的 HTML 文件:
<SCRIPT language="javascript" type="text/javascript">
var statList = new Array(
0, "192.168.1.179", "88-53-95-28-2B-AF", 194280, 101141053, 0, 0, 0, 0, 0, 0, 0, 0,
1, "192.168.1.170", "60-C5-47-10-37-FD", 132316, 65860791, 0, 0, 0, 0, 0, 0, 0, 0,
2, "192.168.1.151", "68-5D-43-21-76-95", 9887, 3898646, 0, 0, 0, 0, 0, 0, 0, 0,
3, "192.168.1.134", "6C-3E-6D-8C-FF-62", 26405, 7521875, 0, 0, 0, 0, 0, 0, 0, 0,
4, "192.168.1.124", "04-F7-E4-78-D3-D0", 6189, 1791672, 0, 0, 0, 0, 0, 0, 0, 0,
5, "192.168.1.121", "60-C5-47-10-40-92", 122657, 91113301, 0, 0, 0, 0, 0, 0, 0, 0);
</SCRIPT>
我想从此文件中获取内容。这是javascript中的一个数组,即“StatList”。我想在一个数组中选择所有 IP 地址,如(192.168.1.179),在另一个 PHP 数组中选择所有 Mac 地址,如(88-53-95-28-2B-AF)。
我怎样才能做到这一点?