168 lines
7.0 KiB
HTML
168 lines
7.0 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title></title>
|
|
<link href="css/bootstrap.min.css" rel="stylesheet">
|
|
<link href="css/app.css" rel="stylesheet">
|
|
<script src="js/config.js"></script>
|
|
<script src="js/jquery-3.7.1.js"></script>
|
|
</head>
|
|
|
|
<body class="h-100 text-center text-bg-dark content-warp">
|
|
<div class="d-flex w-100 h-100 mx-auto flex-column">
|
|
<header class="mb-auto pb-5">
|
|
<div class="dotblock d-flex justify-content-between px-5 py-4">
|
|
<div class="fs-3">GEAZAN</div>
|
|
<div></div>
|
|
</div>
|
|
<div class="d-flex justify-content-center fw-bold border-black nav">
|
|
<div class="">
|
|
<a href="home.html">HOME</a>
|
|
</div>
|
|
<div class=""><a href="filter.html">FILTER</a></div>
|
|
<div class=""><a href="fs.html">FS</div>
|
|
<div class=""><a href="eq.html">EQ</a></div>
|
|
<div class=""><a href="ducking.html">DUCKING</a></div>
|
|
<div class="active"><a href="network.html">NETWORK</a></div>
|
|
<div class="">
|
|
<a href="security.html">SECURITY</a>
|
|
</div>
|
|
<div class=""><a href="control.html">CONTROL</a></div>
|
|
<div class="last "><a href="system.html">SYSTEM</a></div>
|
|
</div>
|
|
</header>
|
|
|
|
<main class="px-3 d-flex justify-content-center">
|
|
<div class="form">
|
|
<div class="border border-black m-6 password-form">
|
|
<div class=" m-5 mx-auto form" style="width: 500px;">
|
|
<div class="mb-3 row">
|
|
<label for="staticEmail" class="col-sm-5 col-form-label">IP Configuration</label>
|
|
<div class="col-sm-7 text-start py-2">
|
|
<div class="form-check form-check-inline">
|
|
<input class="form-check-input" checked type="radio" name="type" id="type-dhcp"
|
|
value="dhcp">
|
|
<label class="form-check-label" for="type-dhcp">DHCP</label>
|
|
</div>
|
|
<div class="form-check form-check-inline">
|
|
<input class="form-check-input" type="radio" name="type" id="type-static"
|
|
value="static">
|
|
<label class="form-check-label" for="type-static">Static IP</label>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="mb-3 row">
|
|
<label for="staticEmail" class="col-sm-5 col-form-label">Mac Address</label>
|
|
<div class="col-sm-7 text-start py-2" id="mac">
|
|
10-A6-56-EF-23-D6
|
|
</div>
|
|
</div>
|
|
<div class="mb-3 row">
|
|
<label for="ipaddress" class="col-sm-5 col-form-label">IP Address</label>
|
|
<div class="col-sm-7">
|
|
<input type="text" class="form-control" id="ipaddress">
|
|
</div>
|
|
</div>
|
|
<div class="mb-3 row">
|
|
<label for="subnet" class="col-sm-5 col-form-label">Subnet Mask</label>
|
|
<div class="col-sm-7">
|
|
<input type="text" class="form-control" id="subnet">
|
|
</div>
|
|
</div>
|
|
<div class="mb-3 row">
|
|
<label for="gateway" class="col-sm-5 col-form-label">Gateway</label>
|
|
<div class="col-sm-7">
|
|
<input type="text" class="form-control" id="gateway">
|
|
</div>
|
|
</div>
|
|
<div class="mb-3 row">
|
|
<label for="hostName" class="col-sm-5 col-form-label">Host Name</label>
|
|
<div class="col-sm-7">
|
|
<input type="password" class="form-control" id="hostName">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="mt-5 pb-5">
|
|
<button type="button" class="btn btn-dark border border-black px-5" id="submit">Confirm</button>
|
|
</div>
|
|
</div>
|
|
</main>
|
|
|
|
<footer class="mt-auto text-white-50">
|
|
<div class="dotblock d-flex justify-content-between px-5 py-4">
|
|
<div class="">Geazan</div>
|
|
<div>www.geazan.com</div>
|
|
</div>
|
|
</footer>
|
|
</div>
|
|
|
|
<script>
|
|
document.addEventListener("DOMContentLoaded", function () {
|
|
//初始化配置
|
|
loadData()
|
|
checkDisable();
|
|
})
|
|
|
|
$(document).ready(function () {
|
|
$("input[name='type']").on('change', function () {
|
|
console.log($("input[name=type]:checked").val())
|
|
checkDisable();
|
|
})
|
|
|
|
$("#submit").on('click', function () {
|
|
if (isValidIP($("#ipaddress").val()) == false) {
|
|
alert('The ip address format is incorrect')
|
|
return
|
|
}
|
|
if (isValidIP($('#subnet').val()) == false) {
|
|
alert('The subnet address format is incorrect')
|
|
return
|
|
}
|
|
if (isValidIP($('#gateway').val()) == false) {
|
|
alert('The gateway address format is incorrect')
|
|
return
|
|
}
|
|
if ($('#hostName').val().length > 32) {
|
|
alert('The host name contains a maximum of 32 characters')
|
|
return
|
|
}
|
|
|
|
|
|
|
|
})
|
|
})
|
|
|
|
|
|
function checkDisable() {
|
|
var type = $("input[name='type']:checked").val()
|
|
if (type == 'dhcp') {
|
|
$("#ipaddress").attr('disabled', "disabled");
|
|
$('#subnet').attr('disabled', "disabled");
|
|
$('#gateway').attr('disabled', "disabled");
|
|
}
|
|
else{
|
|
$("#ipaddress").removeAttr("disabled");
|
|
$('#subnet').removeAttr("disabled");
|
|
$('#gateway').removeAttr("disabled");
|
|
}
|
|
}
|
|
|
|
function loadData() {
|
|
$('#mac').text("20-A6-56-EF-23-D6")
|
|
$("#ipaddress").val('127.0.0.10')
|
|
$('#subnet').val('255.255.255.0')
|
|
$('#gateway').val('127.0.0.1')
|
|
$('#hostName').val('host-name')
|
|
}
|
|
|
|
function isValidIP(ip) {
|
|
var reg = /^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$/
|
|
return reg.test(ip);
|
|
}
|
|
</script>
|
|
</body>
|
|
|
|
</html> |