mirror of
https://github.com/Websoft9/websoft9.git
synced 2024-11-26 01:20:28 +00:00
34 lines
No EOL
792 B
HTML
34 lines
No EOL
792 B
HTML
<html>
|
|
<head>
|
|
<title>Embedded Cockpit</title>
|
|
|
|
<script src="../base1/cockpit.js"></script>
|
|
<script src="../manifests.js"></script>
|
|
<script src="../*/po.js"></script>
|
|
<script>
|
|
function getInfo(){
|
|
cockpit.file("/credentials/password.txt").read().then((content, tag) => {
|
|
document.getElementById("sysinfo").innerText = content
|
|
})
|
|
.catch(error => {
|
|
alert("查看账户信息失败");
|
|
});
|
|
}
|
|
|
|
function clearInfo(){
|
|
document.getElementById("sysinfo").innerText = ""
|
|
}
|
|
|
|
</script>
|
|
|
|
</head>
|
|
<body>
|
|
<div>
|
|
<button type="button" onclick="getInfo()">查看账号密码</button>
|
|
<button type="button" onclick="clearInfo()">隐藏账号密码</button>
|
|
<div id="sysinfo">
|
|
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html> |