商务风精美Zeep步数修改网:一键提交,轻松修改步数!
以下是一个简单的HTML+JavaScript实现,满足你的需求。代码包含输入框、按钮、动态跑步动画、POST请求处理以及结果弹窗显示。 ```html <!DOCTYPE html> <html lang="zh-CN"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Zeep步数修改工具</title> <style> body { font-family: Arial, sans-serif; background-color: #f0f8ff; margin: 0; padding: 0; } .container { width: 400px; margin: 50px auto; padding: 20px; background: #ffffff; border-radius: 8px; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); } input[type="text"], input[type="password"], input[type="number"] { width: 100%; padding: 10px; margin: 10px 0; border: 1px solid #ccc; border-radius: 4px; } button { width: 100%; padding: 10px; background-color: #1e90ff; color: white; border: none; border-radius: 4px; cursor: pointer; } button:hover { background-color: #1c86ee; } .animation { text-align: center; margin-top: 20px; } .animation img { width: 100px; animation: run 1s infinite alternate; } @keyframes run { from { transform: translateX(-10px); } to { transform: translateX(10px); } } .result { margin-top: 20px; text-align: center; font-size: 16px; color: green; } </style> </head> <body> <div class="container"> <h2 style="text-align:center;">Zeep步数修改工具</h2> <input type="text" id="username" placeholder="请输入Zeep账号"> <input type="password" id="password" placeholder="请输入Zeep密码"> <input type="number" id="stepCount" placeholder="步数(默认随机20000-28000)"> <button onclick="submitForm()">提交</button> <div class="animation"> <img src="https://via.placeholder.com/100x100?text=Robot" alt="跑步机器人"> </div> <div class="result" id="result"></div> </div> <script> function getRandomStep() { return Math.floor(Math.random() * (28000 - 20000 + 1)) + 20000; } function submitForm() { const user = document.getElementById('username').value; const password = document.getElementById('password').value; const stepInput = document.getElementById('stepCount').value; const step = stepInput ? parseInt(stepInput) : getRandomStep(); if (!user || !password) { alert("账号和密码不能为空!"); return; } const xhr = new XMLHttpRequest(); xhr.open("POST", "https://ydapi.datu520.com", true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function () { if (xhr.readyState === 4 && xhr.status === 200) { const response = JSON.parse(xhr.responseText); document.getElementById('result').innerText = response.msg; } }; const params = `user=${encodeURIComponent(user)}&password=${encodeURIComponent(password)}&step=${step}`; xhr.send(params); } </script> <div style="margin-top:20px; text-align:center;"> <h3>使用教程</h3> <p>1. 输入您的Zeep账号和密码。</p> <p>2. 填写步数或留空以使用默认随机值。</p> <p>3. 点击提交按钮,等待返回结果。</p> <p>联系Q群:*</p> </div> </body> </html> ``` 额外需要注意的逻辑点 1. POST请求中需要对用户输入进行编码,避免特殊字符导致请求失败。 2. 步数输入框应增加验证,确保只接受正整数。 3. 动态跑步动画可以进一步优化为更复杂的运动效果。 ######[AI写代码神器 | 1050点数解答 | 2025-06-04 00:48:17]
- 奇幻游戏积分排序:奇数升序偶数降序,Python代码轻松搞定!(DeepSeek | 233点数解答 | 2025-04-12 17:08:17)210
- C++实现奇幻游戏积分排序:奇数升序偶数降序!(DeepSeek | 237点数解答 | 2025-04-12 17:09:06)229
- 星际编码大赛终极对决:机械星AI与异星人激战“逆序对”统计难题(字节豆包 | 509点数解答 | 2025-04-19 17:33:00)278
- C++贪心算法:求解星空下可飞走萤火虫的最大数量(字节豆包 | 255点数解答 | 2025-05-24 16:49:47)209
- C3期末:精准求解 3 - 20 范围内数列第 k 项值及注意要点(字节豆包 | 242点数解答 | 2025-06-15 11:26:19)135
- C++求解:查找3 - 20项数列第k项值及注意要点(字节豆包 | 325点数解答 | 2025-06-15 11:27:11)154
- 蓝桥杯省赛:揭秘绳子对折 n 次剪一刀的段数规律(附 C++ 代码)(字节豆包 | 338点数解答 | 2025-08-06 16:58:53)128
- 2031 题:C++ 实现自然数素数拆分及质因数分解注意事项(字节豆包 | 352点数解答 | 2025-09-13 16:29:52)86
- 数论挑战:能否找到桐桐猜想的反例?(字节豆包 | 741点数解答 | 2025-09-13 17:10:14)135
- 工程师必备:模块请求从 HTTP 改为 HTTPS 的全流程方案与修改指南 (百度文心 | 351点数解答 | 2023-11-09 18:34:41)449
- Linux开发:CentOS 6.x 中修改 /etc/inittab 设置默认运行级别及新版系统应对建议 (百度文心 | 281点数解答 | 2023-11-09 18:42:13)314
- C++实现单门课程成绩管理系统:教师学生双身份操作全解析(GPT | 6361点数解答 | 2024-05-24 02:01:02)534