打开/关闭搜索
搜索
打开/关闭菜单
933
1525
112
1.4万
植物大战僵尸杂交版Wiki
导航
首页
最近更改
随机页面
MediaWiki帮助
特殊页面
上传文件
打开/关闭外观设置菜单
notifications
打开/关闭个人菜单
未登录
未登录用户的IP地址会在进行任意编辑后公开展示。
user-interface-preferences
个人工具
创建账号
登录
查看“︁微件:RandomPlant”︁的源代码
来自植物大战僵尸杂交版Wiki
查看
阅读
查看源代码
查看历史
associated-pages
微件
讨论
更多操作
←
微件:RandomPlant
因为以下原因,您没有权限编辑该页面:
您请求的操作仅限属于该用户组的用户执行:
用户
您没有权限编辑
微件
命名空间内的页面。
您可以查看和复制此页面的源代码。
<includeonly> <style> .random-plant-box { text-align: center; padding: 20px; background: #f5f5f5; border-radius: 12px; border: 1px solid #e0e0e0; margin: 15px 0; } .random-plant-btn { padding: 10px 30px; font-size: 16px; background: #4CAF50; color: #fff; border: none; border-radius: 8px; cursor: pointer; margin-bottom: 15px; } .random-plant-btn:hover { background: #45a049; } .random-plant-result { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; } .random-plant-result a { display: inline-block; padding: 6px 14px; background: #fff; border: 1px solid #4CAF50; border-radius: 20px; color: #4CAF50; text-decoration: none; font-size: 14px; transition: all 0.2s; } .random-plant-result a:hover { background: #4CAF50; color: #fff; } </style> <div class="random-plant-box"> <button class="random-plant-btn" id="random-plant-btn">🎲 随机抽 5 个植物</button> <div class="random-plant-result" id="random-plant-result"></div> </div> <script> (function() { function pickRandom() { var names = []; $('.pvzhe-card-name').each(function() { var name = $(this).text().trim(); if (name) names.push(name); }); if (names.length === 0) { $('#random-plant-result').html('<span style="color:#888;">当前页面无植物卡片</span>'); return; } names = names.sort(function() { return Math.random() - 0.5; }); var picked = names.slice(0, 5); var html = ''; picked.forEach(function(name) { html += '<a href="/w/' + encodeURIComponent(name) + '">' + name + '</a>'; }); $('#random-plant-result').html(html); } $(document).on('click', '#random-plant-btn', pickRandom); })(); </script> </includeonly>
返回
微件:RandomPlant
。
查看“︁微件:RandomPlant”︁的源代码
来自植物大战僵尸杂交版Wiki