【发布时间】:2020-08-20 19:56:27
【问题描述】:
在我的主页上,我有一个显示“Enter”的按钮
<button id="Enter" type="button" onclick="/profile" class="button">Enter</button>
</div>
我希望当单击此按钮时,它会指向“主页”页面
Python 代码:
@app.route('/', methods = ['GET', 'POST'])
def index():
return render_template("main.html")
@app.route('/home', methods = ['GET', 'POST'])
def home():
return render_template("test1.html")
如何做到这一点?谢谢
【问题讨论】: