whycq
2024-11-29 d2c0bccd2e6dde4cf2a614a67bbf0ed45e2bcbaf
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
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>wcs监控图</title>
    <script src="../../static/js/jquery/jquery-3.3.1.min.js"></script>
    <style>
        * {
            margin: 0;
            overflow: hidden;
        }
        html,body {
            height: 100%;
        }
        #content {
            width: 100%;
            height: 100%;
            border: none
        }
    </style>
</head>
<body style="background: #1f3366" >
    <div
            style="position: absolute;top: 80px;right: 50px;background-color: #fff;height: 30px;width: 80px;text-align: center;line-height: 30px;border-radius: 4px;">
        <div id="floorBtn" onclick="changFloor()">1楼</div>
    </div>
    <iframe style="width: 100%" id="content" src="wcsmap.html"></iframe>
</body>
</html>
<script>
    function changFloor() {
        var btnText = document.getElementById('floorBtn')
        if (btnText.textContent == '1楼') {
            btnText.textContent = '2楼'
            $('#content').attr("src", 'wcsmap2.html');
        } else {
            btnText.textContent = '1楼'
            $('#content').attr("src", 'wcsmap.html');
        }
 
 
    }
</script>