-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
28 lines (27 loc) · 809 Bytes
/
index.html
File metadata and controls
28 lines (27 loc) · 809 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<!doctype html>
<html>
<head>
<meta charset="utf8" />
<title>SSH Script</title>
</head>
<body>
<button onclick="handleRunScript()">Run Script</button>
<script>
function handleRunScript() {
var xmlhttp = new XMLHttpRequest();
xmlhttp.onreadystatechange = function() {
if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
// console.log('responseText:' + xmlhttp.responseText);
if (xmlhttp.responseText=="1") {
alert("Success!");
} else {
alert("Failure!");
}
}
};
xmlhttp.open("GET", "ssh.php", true);
xmlhttp.send();
}
</script>
</body>
</html>