• 寒假自学1.21


    flask页面的跳转测试

    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
     <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/4.3.1/css/bootstrap.min.css">
     <script src="https://cdn.staticfile.org/jquery/3.2.1/jquery.min.js"></script>
     <script src="https://cdn.staticfile.org/popper.js/1.15.0/umd/popper.min.js"></script>
     <script src="https://cdn.staticfile.org/twitter-bootstrap/4.3.1/js/bootstrap.min.js"></script>
    <title>Insert title here</title>
    <style type="text/css">
    *{
    padding:0px;
    margin:0px;
    }
    .header{
    100%;
    height:120px;
    background-color:brown;
    text-align:center;
    position:relative;
    }
    .contain{
    100%;
    height:780px;
    position:relative;
    background-color:blue;
    }
    .list-group{
    15%;
    float:left;
    }
    a{
    text-decoration:none;
    100%;
    }
    .list-group a:hover{
    font-size:18px;
    font-weight:bold;
    }
    .operation{
    85%;
    height:780px;
    float:right;
    }
    iframe{
    border:0px;
    }
    .loginfoshow{
    position:absolute;
    auto;
    text-align:right;
    bottom:5px;
    right:5px;
    }
    .loginfoshow a
    {
    color:#D8D8D8;
    cursor:pointer;
    }
    .loginfoshow a:hover
    {
    color:white;
    }
    .loginfoshow p{
    float:left;
    color:white;
    }
    
    </style>
    <script>
    
    </script>
    </head>
    <body onload="onload()">
    	<div class="header">
    		<h2>新闻文本分析及相关性展示</h2>
    		<div class="loginfoshow" id="userinfor">
    			<p id="informationshow"></p>
    
    		</div>
    	</div>
    	<div class="contain">
    		<div class="list-group">
    
    			<a href="{{ url_for('index') }}" class="list-group-item list-group-item-aciton" target="operation">咨询</a>
    
    		</div>
    		<div class="operation">
                <iframe name="operation" src="" width="100%" height="100%" style="background-color: gray;"></iframe>
    		</div>
    	</div>
    	<div class="footer"></div>
    </body>
    </html>
    

      

    from flask import Flask, render_template
    
    app = Flask(__name__)
    
    
    @app.route('/')
    def hello_world():
        return render_template('test.html', error=True)
    @app.route('/index')
    def index():
        return render_template('my1.html')
    
    if __name__ == '__main__':
        app.run()
    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>咨询</title>
    </head>
    <body>
    123456
    </body>
    </html>
  • 相关阅读:
    负载均衡的基础技术种类
    scp基本使用方法
    给linux添加yum源。
    Linux 克隆虚拟机引起的“Device eth0 does not seem to be present, delaying initialization”
    FastDFS-单机版安装
    已安装nginx动态添加模块
    FastDFS
    七、CentOS 6.5 下 Nginx的反向代理和负载均衡的实现
    www.xxx.com 与 m.xxx.com 的Nginx服务器实现
    六、CentOS 6.5 下Nginx的配置
  • 原文地址:https://www.cnblogs.com/sunhongbin/p/14906166.html
Copyright © 2020-2023  润新知