You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
617 B

from flask import Flask
from flask import render_template
from flask import request
app = Flask(__name__)
@app.route('/')
def hello_world():
return "hello world"
@app.route('/login')
def hello_world2():
name = request.values.get("name")
pwd = request.values.get("pwd")
return f"name={name},pwd={pwd}"
@app.route('/abc')
def hello_world1():
id = request.values.get("id")
return f"""
<form action="/login">
账号<input name="name" value="{id}"><br>
密码<input name="pwd">
<input type="submit">
</form>
"""
if __name__=="__main__":
app.run()