|
|
|
@ -1,7 +1,7 @@ |
|
|
|
|
<!DOCTYPE html> |
|
|
|
|
<html lang="en"> |
|
|
|
|
<head> |
|
|
|
|
<meta charset="UTF-8"/> |
|
|
|
|
<head> |
|
|
|
|
<meta charset="UTF-8" /> |
|
|
|
|
<title>Знакомство с aiohttp</title> |
|
|
|
|
<style> |
|
|
|
|
html { |
|
|
|
@ -10,7 +10,7 @@ |
|
|
|
|
|
|
|
|
|
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%) |
|
|
|
|
background: linear-gradient(90deg, rgba(2,0,36,1) 0%, rgba(9,9,121,1) 35%, rgba(0,212,255,1) 100%) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
h1 { |
|
|
|
@ -62,7 +62,6 @@ |
|
|
|
|
-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; |
|
|
|
@ -70,27 +69,25 @@ |
|
|
|
|
} |
|
|
|
|
</style> |
|
|
|
|
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script> |
|
|
|
|
</head> |
|
|
|
|
<body> |
|
|
|
|
<div> |
|
|
|
|
</head> |
|
|
|
|
<body> |
|
|
|
|
<div> |
|
|
|
|
<h1>Знакомство с aiohttp</h1> |
|
|
|
|
<div id="root"> |
|
|
|
|
<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> |
|
|
|
|
</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); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|