标签:__name__ utf-8 erro _for 设置 png styles html 完成
from flask import Flask,render_template app = Flask(__name__) @app.route(‘/‘) def vi(): return render_template("vi.html") @app.route("/login") def login(): return render_template("vv.html") @app.route("/regiter") def regiter(): return render_template("vv1.html") if __name__ == ‘__main__‘: app.run(debug=True)
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>登录</title> <link href="../static/vv.css" rel="stylesheet" type="text/css"> <script src="../static/vv.js"></script> </head> <body bgcolor="#778899" class="div4"> <div class="div1"> <h2 class="title"> <div class="normal-title"> <a class="div2" href="vv.html">登录</a> <b>|</b> <a class="div2" href="vv1.html">注册</a> </div> </h2> <div class="div3"> 用户:<input id="username" type="text" placeholder="请输入昵称"> </div> <div class="div3"> 密码:<input id="userpass" type="text" placeholder="请输入密码"> </div> <div id="error_box"><br></div> <div class="div3"> <button onclick="myLogin()">Login</button> </div> <div class="div2">ByYin</div> </div> <br> </body> </html>
标签:__name__ utf-8 erro _for 设置 png styles html 完成
原文地址:http://www.cnblogs.com/yin-yeah/p/7780305.html