arp列表终版
This commit is contained in:
parent
80d9ba5f9e
commit
6e3d9489fb
34
www/arp.html
34
www/arp.html
|
@ -6,10 +6,32 @@
|
||||||
<meta name="author" content="zifan">
|
<meta name="author" content="zifan">
|
||||||
<meta name="keywords" content="物联网">
|
<meta name="keywords" content="物联网">
|
||||||
<title>ARP列表</title>
|
<title>ARP列表</title>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
html,
|
||||||
|
body {
|
||||||
|
height: 100%;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
|
||||||
|
#arpTable {
|
||||||
|
background-color: rgba(41, 117, 117, 0.667);
|
||||||
|
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.5);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<table id="arpTable" width="700" align="center" border="1">
|
<div></div>
|
||||||
|
<div class="tablecenter">
|
||||||
|
<table id="arpTable" width="700" align="center" border="1" cellspacing="0">
|
||||||
<thead>
|
<thead>
|
||||||
<th>ID</th>
|
<th>ID</th>
|
||||||
<th>ip地址</th>
|
<th>ip地址</th>
|
||||||
|
@ -19,12 +41,14 @@
|
||||||
|
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
</div>
|
||||||
|
<div></div>
|
||||||
|
<div></div>
|
||||||
<script>
|
<script>
|
||||||
window.onload = function () {
|
window.onload = function () {
|
||||||
fetch("/cgi-bin/ip.cgi").then(resp => resp.json()).then(data => {
|
fetch("/cgi-bin/arp.cgi").then(resp => resp.json()).then(data => {
|
||||||
if (data.code == 0) {
|
|
||||||
arpTableBody.innerText = "";
|
arpTableBody.innerText = "";
|
||||||
data.data.forEach(rowData => {
|
data.forEach(rowData => {
|
||||||
let tr = document.createElement("tr");
|
let tr = document.createElement("tr");
|
||||||
let td1 = document.createElement("td");
|
let td1 = document.createElement("td");
|
||||||
let td2 = document.createElement("td");
|
let td2 = document.createElement("td");
|
||||||
|
@ -38,7 +62,7 @@
|
||||||
arpTableBody.append(tr);
|
arpTableBody.append(tr);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
})
|
)
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
|
Loading…
Reference in New Issue