QQ群聊天网警已经介入,最新QQ xml卡片生成器,装逼娱乐神器代码【html+js】

232 阅读2分钟

下载地址:www.pan38.com/dow/share.p… 提取密码:1133

这个代码创建了一个完整的QQ XML卡片生成器网页应用,包含标题、内容输入、颜色选择、实时预览和XML代码生成功能。请注意这仅用于学习和研究目的,实际使用需遵守相关法律法规。

`

QQ卡片消息生成器 body { font-family: 'Microsoft YaHei', sans-serif; max-width: 800px; margin: 0 auto; padding: 20px; background-color: #f5f5f5; } .container { background-color: white; padding: 20px; border-radius: 10px; box-shadow: 0 0 10px rgba(0,0,0,0.1); } .preview { border: 1px dashed #ccc; padding: 15px; margin: 15px 0; min-height: 100px; background-color: #f9f9f9; } textarea { width: 100%; height: 150px; margin: 10px 0; padding: 10px; border: 1px solid #ddd; border-radius: 5px; } button { background-color: #12b7f5; color: white; border: none; padding: 10px 20px; border-radius: 5px; cursor: pointer; font-size: 16px; margin-right: 10px; } button:hover { background-color: #0e9fd8; } .card { border: 1px solid #e7e7e7; border-radius: 8px; padding: 12px; margin: 10px 0; background-color: white; max-width: 300px; } .card-title { font-weight: bold; margin-bottom: 8px; color: #333; } .card-content { color: #666; font-size: 14px; }

QQ XML卡片消息生成器

    <div>
        <h3>卡片标题</h3>
        <input type="text" id="cardTitle" placeholder="输入卡片标题" style="width: 100%; padding: 8px;">
        
        <h3>卡片内容</h3>
        <textarea id="cardContent" placeholder="输入卡片内容..."></textarea>
        
        <h3>卡片颜色</h3>
        <select id="cardColor">
            <option value="#12b7f5">默认蓝</option>
            <option value="#ff4d4f">红色</option>
            <option value="#52c41a">绿色</option>
            <option value="#faad14">黄色</option>
            <option value="#722ed1">紫色</option>
        </select>
        
        <div style="margin: 20px 0;">
            <button onclick="generateCard()">生成卡片</button>
            <button onclick="copyXML()">复制XML代码</button>
            <button onclick="resetForm()">重置</button>
        </div>
    </div>
    
    <h3>预览效果</h3>
    <div class="preview" id="cardPreview">
        <p>生成的卡片将在这里显示...</p>
    </div>
    
    <h3>XML代码</h3>
    <textarea id="xmlOutput" readonly></textarea>
</div>

<script>
    function generateCard() {
        const title = document.getElementById('cardTitle').value || '默认标题';
        const content = document.getElementById('cardContent').value || '这里是卡片内容...';
        const color = document.getElementById('cardColor').value;
        
        // 生成预览
        const preview = document.getElementById('cardPreview');
        preview.innerHTML = `
            <div class="card" style="border-left: 4px solid ${color};">
                <div class="card-title">${title}</div>
                <div class="card-content">${content.replace(/\n/g, '<br>')}</div>
            </div>
        `;
        
        // 生成XML代码
        const xmlCode = `
${title} ${content} `.trim();
        document.getElementById('xmlOutput').value = xmlCode;
    }
    
    function copyXML() {
        const xmlOutput = document.getElementById('xmlOutput');
        xmlOutput.select();
        document.execCommand('copy');
        alert('XML代码已复制到剪贴板!');
    }
    
    function resetForm() {
        document.getElementById('cardTitle').value = '';
        document.getElementById('cardContent').value = '';
        document.getElementById('cardColor').value = '#12b7f5';
        document.getElementById('cardPreview').innerHTML = '<p>生成的卡片将在这里显示...</p>';
        document.getElementById('xmlOutput').value = '';
    }
    
    // 初始化生成一个示例卡片
    window.onload = function() {
        document.getElementById('cardTitle').value = '欢迎使用卡片生成器';
        document.getElementById('cardContent').value = '这是一个示例卡片内容\n您可以自由修改标题和内容\n然后点击"生成卡片"按钮';
        generateCard();
    };
</script>
`