<!DOCTYPE html >
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<title>发射器</title>
<style>
body{ text-align:center;
margin: 0 auto;
padding: 20px;}
</style>
<link rel="stylesheet" href="css/buttons.css">
<script src="js/jquery-2.1.4.js"></script>
</head>
<body>
<div>
<a href="#" onclick="update(1)" class="button button-inverse button-circle button-jumbo">1</a>
<a href="#" onclick="update(2)" class="button button-primary button-circle button-jumbo">2</a>
<a href="#" onclick="update(3)" class="button button-action button-circle button-jumbo">3</a>
<a href="#" onclick="update(4)" class="button button-highlight button-circle button-jumbo">4</a>
<a href="#" onclick="update(5)" class="button button-caution button-circle button-jumbo">5</a>
<a href="#" onclick="update(6)" class="button button-royal button-circle button-jumbo">6</a>
<a href="#" onclick="update(7)" class="button button-primary button-circle button-jumbo">7</a>
<a href="#" onclick="update(8)" class="button button-highlight button-circle button-jumbo">8</a>
</div>
<div><span style="color:red; text-align: center; padding: 20px;" id="result"></span> </div>
<script>
function update(id) {
$.ajax({
url: "/notify?id="+id,
type: "GET",
async: true,
success: function (res) {
console.log(res);
$("#result").text(res);
}
});
};
</script>
</body>
</html>