Merge
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user