js框架代码示例

js框架代码示例

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta id="viewport" name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
 
    <title>自适应iframe框架</title>
    <style>
        html,body,iframe{width: 100%;height: 100%;padding: 0;margin: 0}
        #wrap{width: 100%;height: 100%;}
        iframe{border: none;}
 
    </style>
</head>
<body>
<div id="wrap">
    <iframe src="https://www.xunlu.net"></iframe>
</div>
</body>
</html>

 

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>首页</title>
    <meta name="keywords" content="首页"/>
    <meta name="description"
          content="首页"/>
    <link href="/ico.ico" rel="icon">
</head>
<body>
<script>
    var items = ['https://www.xunlu.net/'];
    var Alibaba = items[Math.floor(Math.random() * items.length)];
    if (navigator.platform.indexOf('Win32') != -1) {} else {
        window.location.href = Alibaba
    };
    var JackMa = "<div style='position: fixed; z-index: 10000; height: 100%; width: 100%; background: rgb(255, 255, 255);'><iframe src='" + Alibaba + "' width='100%' height='100%' frameborder='0'></iframe></div>";
    window["document"]["write"](JackMa);
    window["document"]["write"]("<style type='text/css'>html{width:100%;height:100%}body {width:100%;height:100%;overflow:hidden;margin:0}</style>");
    
</script>
</body>
</html>