|
|
|
@ -1,93 +1,96 @@ |
|
|
|
|
<!DOCTYPE html> |
|
|
|
|
<html lang="en"> |
|
|
|
|
<head> |
|
|
|
|
<meta charset="UTF-8" /> |
|
|
|
|
<head> |
|
|
|
|
<meta charset="UTF-8"/> |
|
|
|
|
<title>Знакомство с aiohttp</title> |
|
|
|
|
<style> |
|
|
|
|
html { |
|
|
|
|
font-family: Verdana, "sans-serif"; |
|
|
|
|
} |
|
|
|
|
html { |
|
|
|
|
font-family: Verdana, "sans-serif"; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
body { |
|
|
|
|
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%) |
|
|
|
|
} |
|
|
|
|
body { |
|
|
|
|
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%) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
h1 { |
|
|
|
|
text-align: center; |
|
|
|
|
color: white; |
|
|
|
|
text-shadow: 0 2px 5px rgba(150, 150, 150, 0.8); |
|
|
|
|
} |
|
|
|
|
h1 { |
|
|
|
|
text-align: center; |
|
|
|
|
color: white; |
|
|
|
|
text-shadow: 0 2px 5px rgba(150, 150, 150, 0.8); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
#root { |
|
|
|
|
display: flex; |
|
|
|
|
flex-direction: column; |
|
|
|
|
align-items: center; |
|
|
|
|
} |
|
|
|
|
#root { |
|
|
|
|
display: flex; |
|
|
|
|
flex-direction: column; |
|
|
|
|
align-items: center; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.form { |
|
|
|
|
width: 70%; |
|
|
|
|
margin-bottom: 20px; |
|
|
|
|
} |
|
|
|
|
.form { |
|
|
|
|
width: 70%; |
|
|
|
|
margin-bottom: 20px; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.form__button { |
|
|
|
|
text-align: center; |
|
|
|
|
margin-top: 10px; |
|
|
|
|
background-color: white; |
|
|
|
|
cursor: pointer; |
|
|
|
|
} |
|
|
|
|
.form__button { |
|
|
|
|
text-align: center; |
|
|
|
|
margin-top: 10px; |
|
|
|
|
background-color: white; |
|
|
|
|
cursor: pointer; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
#myButton { |
|
|
|
|
box-sizing: border-box; |
|
|
|
|
width: 100%; |
|
|
|
|
font-size: 18px; |
|
|
|
|
outline: none; |
|
|
|
|
border: none; |
|
|
|
|
padding: 20px; |
|
|
|
|
border-radius: 5px; |
|
|
|
|
-webkit-transition: 0.3s; |
|
|
|
|
-moz-transition: 0.3s; |
|
|
|
|
transition: 0.3s; |
|
|
|
|
-webkit-box-shadow: 0px 5px 5px 0px rgba(0, 0, 0, 0.1); |
|
|
|
|
-moz-box-shadow: 0px 5px 5px 0px rgba(0, 0, 0, 0.1); |
|
|
|
|
box-shadow: 0px 5px 5px 0px rgba(0, 0, 0, 0.1); |
|
|
|
|
} |
|
|
|
|
#myButton { |
|
|
|
|
box-sizing: border-box; |
|
|
|
|
width: 100%; |
|
|
|
|
font-size: 18px; |
|
|
|
|
outline: none; |
|
|
|
|
border: none; |
|
|
|
|
padding: 20px; |
|
|
|
|
border-radius: 5px; |
|
|
|
|
-webkit-transition: 0.3s; |
|
|
|
|
-moz-transition: 0.3s; |
|
|
|
|
transition: 0.3s; |
|
|
|
|
-webkit-box-shadow: 0px 5px 5px 0px rgba(0, 0, 0, 0.1); |
|
|
|
|
-moz-box-shadow: 0px 5px 5px 0px rgba(0, 0, 0, 0.1); |
|
|
|
|
box-shadow: 0px 5px 5px 0px rgba(0, 0, 0, 0.1); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
#myButton:hover { |
|
|
|
|
-webkit-transition: 0.3s; |
|
|
|
|
-moz-transition: 0.3s; |
|
|
|
|
transition: 0.3s; |
|
|
|
|
-webkit-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); |
|
|
|
|
} |
|
|
|
|
#myResult { |
|
|
|
|
text-align: center; |
|
|
|
|
color: white; |
|
|
|
|
text-shadow: 0 2px 5px rgba(150, 150, 150, 0.8); |
|
|
|
|
} |
|
|
|
|
#myButton:hover { |
|
|
|
|
-webkit-transition: 0.3s; |
|
|
|
|
-moz-transition: 0.3s; |
|
|
|
|
transition: 0.3s; |
|
|
|
|
-webkit-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); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
#myResult { |
|
|
|
|
text-align: center; |
|
|
|
|
color: white; |
|
|
|
|
text-shadow: 0 2px 5px rgba(150, 150, 150, 0.8); |
|
|
|
|
} |
|
|
|
|
</style> |
|
|
|
|
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script> |
|
|
|
|
</head> |
|
|
|
|
<body> |
|
|
|
|
<div> |
|
|
|
|
<h1>Знакомство с aiohttp</h1> |
|
|
|
|
<div id="root"> |
|
|
|
|
</head> |
|
|
|
|
<body> |
|
|
|
|
<div> |
|
|
|
|
<h1>Знакомство с aiohttp</h1> |
|
|
|
|
<div id="root"> |
|
|
|
|
<div class="form"> |
|
|
|
|
<div class="form__button"><button id='myButton'>Отправить</button></div> |
|
|
|
|
<p id="myResult"></p> |
|
|
|
|
<div class="form__button"> |
|
|
|
|
<button id='myButton'>Отправить</button> |
|
|
|
|
</div> |
|
|
|
|
<p id="myResult"></p> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</body> |
|
|
|
|
<script> |
|
|
|
|
$(document).ready(function() { |
|
|
|
|
$("#myButton").click(function() { |
|
|
|
|
</body> |
|
|
|
|
<script> |
|
|
|
|
$(document).ready(function () { |
|
|
|
|
$("#myButton").click(function () { |
|
|
|
|
$.ajax({ |
|
|
|
|
type: "POST", |
|
|
|
|
url: "/button-clicked", |
|
|
|
|
dataType: "json", |
|
|
|
|
success: function(response) { |
|
|
|
|
success: function (response) { |
|
|
|
|
$("#myResult").text(response.result); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|