This commit is contained in:
khaloufam70043
2019-10-22 15:21:41 +02:00
parent 5b3c211428
commit aa1c1d7331
6 changed files with 69 additions and 16 deletions
+19 -16
View File
@@ -7,6 +7,12 @@ class EigenerHandler(http.server.BaseHTTPRequestHandler):
self.send_response(200)
self.send_header('Content-type', 'text-html')
self.end_headers()
von = 3
bis = 10
msg = """
<html>
<head>
@@ -16,25 +22,22 @@ class EigenerHandler(http.server.BaseHTTPRequestHandler):
}
</style>
</head>
<body>
<h2>Quadratzahlen</h2>
<body>
<h2>Quadratzahlen</h2>
<form action="http://localhost:12345/" method="get">
<div>
<label for="von">Von</label>
<input name="von" id="von" value="1">
</div>
<div>
<label for="bis">Bis</label>
<input name="bis" id="bis" value="5">
</div>
<div>
<button onclick="myFunction()">Eingeben</button>
</div>
</form>
</body>
<table style="width:100%">
"""
while von <= bis:
msg = msg + "<tr><td>{}</td><td>{}</td></tr>".format(von, von*von)
von = von + 1
msg = msg + """
</table>
</body>
</html>
"""
self.wfile.write(msg.encode())
port = 12345