index.html 1.44 KB
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Embed Webpage</title>
    <style>
        .panel-intro {
            border: 1px solid #ddd;
            border-radius: 4px;
            padding: 20px;
            margin: 20px;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
        }
        .iframe-container {
            position: relative;
            width: 100%;
            padding-bottom: 56.25%; /* 16:9 aspect ratio */
            height: 0;
            overflow: hidden;
        }
        .iframe-container iframe {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            border: 0;
        }
    </style>
</head>
<body>
<div class="panel panel-default panel-intro">
    <div class="iframe-container">
<!--        <div>{$token}</div>-->
        <iframe src="/h6?token={$token}" frameborder="0" allowfullscreen></iframe>
    </div>	
</div>
</body>
</html>
<script>
    window.addEventListener('message', function(event) {
//        alert(1111);
        // event.data 包含发送的消息
        console.log('Received message:', event.data);
        window.open(event.data, '_blank')
//    	   window.location.href =event.data
        // 在这里处理收到的消息
    });
</script>



<!--<iframe src="https://antis48.sherkxuan.cn/h6"  allowfullscreen></iframe>-->