在我的主页上有一个按钮,上面写着“Enter”
<button id="Enter" type="button" onclick="/profile" class="button">Enter</button>
</div>
Run Code Online (Sandbox Code Playgroud)
我希望这样当单击此按钮时它会定向到“主页”页面
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")
Run Code Online (Sandbox Code Playgroud)
如何才能做到这一点?谢谢