域名出首页源码,自动获取当前页面域名网址 [复制链接]

帖子链接已复制到剪贴板
V 天马 (UID: 2055) 2023-6-13

1122 3

用Chat写的,大家自己替换联系方式和微信二维码

 

<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>域名可以转让给有需要的人</title>
    <style>
        body {
            background-color: #f0f0f0;
            font-family: Arial, sans-serif;
            color: #333;
            margin: 0;
            padding: 0;
        }

        .container {
            width: 90%;
            max-width: 600px;
            margin: 10% auto 0;
            padding: 2% 5%;
            border-radius: 10px;
            background-color: #fff;
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
        }

        h1 {
            font-size: 30px;
            letter-spacing: 2px;
            margin-bottom: 20px;
        }

        h3 {
            font-size: 20px;
            letter-spacing: 2px;
            margin-bottom: 20px;
        }

        ul {
            padding-left: 20px;
            margin-bottom: 20px;
        }

        li {
            line-height: 1.8;
            letter-spacing: 1px;
        }

        img {
            max-width: 100%;
            height: auto;
            margin-top: 20px;
        }
    </style>
    <script>
        window.onload = function() {
            // 获取当前域名
            var domain = document.location.hostname;
            // 将当前域名插入到标题标签中
            document.title = domain + " - 域名可以转让给有需要的人";
            // 将当前域名插入到页面元素中
            document.getElementById("domain").innerText = domain;
        };
    </script>
</head>
<body>
    <div class="container">
        <h1>域名可以转让给有需要的人&nbsp;&nbsp;&nbsp;<font color="#20a53a"><span id="domain"></span></font></h1>
        <h3>如果您对本域名感兴趣,可以通过下方的联系方式与我沟通。</h3>
        <ul>
            <li>QQ:666238</li>
            <li>微信:666238</li>
            <li>邮箱:666238@qq.com</li>
        </ul>
        <img src="https://img.aylp.com.cn/2023/06/10/49150012e5777.png"/>
    </div>
</body>
</html>
这家伙太懒了,什么也没留下。
已有评论 (3)
提示:您必须 登录 才能查看此内容。
创建新帖
广告推广点击空位自助购买