yujian
2020-01-18 f4a0f2acc63d7785eab108419a4e16f5f688cb95
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8" />
        <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
        <title></title>
        
        <style type="text/css">
            /*全屏暗框*/
            .errorwai{ 
                width: 100%; height: 100%;
                position: fixed; top: 0; left: 0; 
                display: flex; flex-direction: row;  justify-content: center; align-items: center;
                background-color: rgba(0,0,0,0.3);
                font-family: "微软雅黑";
            }
            /*白底框*/
            .error_nwai{
                width: 200px; height: 150px;
                position: relative;
                display: flex; flex-direction: column;
                border: 1px solid #BEBEBE; border-radius: 10px; background-color: white;
            }
            /*X*/
            .error_X{
                position: absolute; top: 5px; right: 10px;
                font-size: 20px; color: #9A9A9A;
            }
            /*温馨提示*/
            .error_title{
                width: 100%; 
                margin-top: 15px;
                font-size: 17px; color: #A0A0A0; text-align: center;
            }
            /*内容*/
            .error_con{
                width: 100%; 
                margin-top: 24px;
                font-size: 12px; color: black; text-align: center;
            }
            /*按钮*/
            .error_btn{
                width: 130px; line-height: 30px;
                margin: 0 auto; margin-top: 28px;
                border-radius: 20px;
                font-size: 15px; background-color: #E5005C; color: white; text-align: center;
            }
        </style>
        
    </head>
    <body>
        
        <!--全屏暗框-->
        <div id="imywai" class="errorwai">
            <!--白底框-->
            <div class="error_nwai">
                <!--X-->
                <div class="error_X">X</div>
                <!--标题-->
                <div class="error_title">温馨提示</div>
                <!--内容-->
                <div class="error_con" id="content">非常遗憾,红包领取失败</div>
                <!--按钮-->
                <div class="error_btn">确认</div>
            </div>
        </div>
        
    </body>
    
    <script type="text/javascript">
        
        var con= "<%=request.getAttribute("msg")%>";
        if(con != "null"){
            document.getElementById("content").innerHTML=con;
        }
            
        //获取屏幕配置
        var myHeight = document.documentElement.clientHeight; //屏幕高度
        console.log("屏幕高度"+myHeight);
        document.getElementById("imywai").style.height = myHeight+"px";
        
        //确认点击
        document.getElementsByClassName("error_btn")[0].onclick=document.getElementsByClassName("error_X")[0].onclick=function()
        {
            console.log("点击关闭");
            document.getElementById("imywai").style.display="none";
        }
        
    </script>
    
</html>