|
|
|
@ -1,7 +1,7 @@
|
|
|
|
<!DOCTYPE html>
|
|
|
|
<!DOCTYPE html>
|
|
|
|
<html lang="en">
|
|
|
|
<html lang="en">
|
|
|
|
<head>
|
|
|
|
<head>
|
|
|
|
<meta charset="UTF-8" />
|
|
|
|
<meta charset="UTF-8"/>
|
|
|
|
<title>Знакомство с aiohttp</title>
|
|
|
|
<title>Знакомство с aiohttp</title>
|
|
|
|
<style>
|
|
|
|
<style>
|
|
|
|
html {
|
|
|
|
html {
|
|
|
|
@ -10,7 +10,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
body {
|
|
|
|
body {
|
|
|
|
min-height: 100vh;
|
|
|
|
min-height: 100vh;
|
|
|
|
background: linear-gradient(90deg, rgba(2,0,36,1) 0%, rgba(9,9,121,1) 35%, rgba(0,212,255,1) 100%)
|
|
|
|
background: linear-gradient(90deg, rgba(2, 0, 36, 1) 0%, rgba(9, 9, 121, 1) 35%, rgba(0, 212, 255, 1) 100%)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
h1 {
|
|
|
|
h1 {
|
|
|
|
@ -62,6 +62,7 @@
|
|
|
|
-moz-box-shadow: 0 5px 5px 0 rgba(0, 0, 0, 0.5);
|
|
|
|
-moz-box-shadow: 0 5px 5px 0 rgba(0, 0, 0, 0.5);
|
|
|
|
box-shadow: 0 5px 5px 0 rgba(0, 0, 0, 0.5);
|
|
|
|
box-shadow: 0 5px 5px 0 rgba(0, 0, 0, 0.5);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#myResult {
|
|
|
|
#myResult {
|
|
|
|
text-align: center;
|
|
|
|
text-align: center;
|
|
|
|
color: white;
|
|
|
|
color: white;
|
|
|
|
@ -69,25 +70,27 @@
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
</style>
|
|
|
|
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
|
|
|
|
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
|
|
|
|
</head>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<body>
|
|
|
|
<div>
|
|
|
|
<div>
|
|
|
|
<h1>Знакомство с aiohttp</h1>
|
|
|
|
<h1>Знакомство с aiohttp</h1>
|
|
|
|
<div id="root">
|
|
|
|
<div id="root">
|
|
|
|
<div class="form">
|
|
|
|
<div class="form">
|
|
|
|
<div class="form__button"><button id='myButton'>Отправить</button></div>
|
|
|
|
<div class="form__button">
|
|
|
|
|
|
|
|
<button id='myButton'>Отправить</button>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<p id="myResult"></p>
|
|
|
|
<p id="myResult"></p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</body>
|
|
|
|
</body>
|
|
|
|
<script>
|
|
|
|
<script>
|
|
|
|
$(document).ready(function() {
|
|
|
|
$(document).ready(function () {
|
|
|
|
$("#myButton").click(function() {
|
|
|
|
$("#myButton").click(function () {
|
|
|
|
$.ajax({
|
|
|
|
$.ajax({
|
|
|
|
type: "POST",
|
|
|
|
type: "POST",
|
|
|
|
url: "/button-clicked",
|
|
|
|
url: "/button-clicked",
|
|
|
|
dataType: "json",
|
|
|
|
dataType: "json",
|
|
|
|
success: function(response) {
|
|
|
|
success: function (response) {
|
|
|
|
$("#myResult").text(response.result);
|
|
|
|
$("#myResult").text(response.result);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|