rover/page.html

42 lines
1.1 KiB
HTML

<HTML>
<!-- For file-serving convenience, both style and JS are present within this file -->
<style>
div {
background-color: lightslategrey;
border-radius: 15px;
width: fit-content;
padding: 10px;
}
h1 {
font-family: Arial, Helvetica, sans-serif;
}
p {
font-family: Arial, Helvetica, sans-serif;
}
button {
border-radius: 4px;
border-style: none;
padding: 15px;
font-size: 17px;
}
</style>
<script>
var xhttp = new XMLHttpRequest();
function toggle() {
xhttp.open("GET", "toggle", true);
xhttp.send();
}
</script>
<BODY>
<center>
<div>
<h1>Rover Control Interface</h1>
<br>
<!-- Calls function which makes AJAX request, page need not reload -->
<button onclick="toggle()">Toggle Motor Status (On/Off)</button>
</div>
<p>A project by ENGR 107 Team 2</p>
</center>
</BODY>
</HTML>