首页
统计
关于
友链
Search
1
欢迎使用 Typecho
326 阅读
2
tycat 生存服务器
200 阅读
3
Akina For Typecho修改版
83 阅读
4
用Python编写程序实现通过省份查询对应的城市名称。
83 阅读
5
羽毛球计分器
76 阅读
默认分类
日常
教程
源码
软件
typecho
Typecho模板
Typecho插件
Typecho代码
vps测评
登录
Search
标签搜索
python
三脚猫
累计撰写
7
篇文章
累计收到
3
条评论
首页
栏目
默认分类
日常
教程
源码
软件
typecho
Typecho模板
Typecho插件
Typecho代码
vps测评
页面
统计
关于
友链
搜索到
2
篇与
的结果
2024-04-28
用Python编写程序实现通过省份查询对应的城市名称。
创建provinces和cities 两个列表,provinces存储3个省份的名称,cities存储provinces中对应省份的的城市名(大于3个)。编写程序实现通过省份查询对应的城市名称。防火墙与VPN技术_14-1-综合应用-USG5500.docx provinces = ['安徽','西藏','浙江'] cities = [['蚌埠','合肥','六安','安庆'],['林芝','拉萨','山南','那曲'],['杭州','金华','台州','温州']] findp = input("请输入您要查询省") ind = provinces.index(findp) print(cities[ind])
2024年04月28日
83 阅读
1 评论
0 点赞
2024-04-28
羽毛球计分器
DOM型XSS22信安1邓子祥2022111001009.docx存储型XSS22信安1邓子祥2022111001009.docx羽毛球计分器演示页面: http://jfe.tycat.cn/ 效果图HTML代码<!DOCTYPE html> <html> <head> <title>比赛记分器</title> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"> <style> body { font-family: 'Helvetica Neue', Arial, sans-serif; text-align: center; background-color: #f8f9fa; margin: 0; padding: 0; overflow: hidden; touch-action: manipulation; } .scoreboard { display: flex; flex-wrap: wrap; justify-content: space-around; align-items: center; height: 100vh; width: 100vw; } .team { background-color: white; padding: 20px; border-radius: 20px; width: 45%; margin-bottom: 20px; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); } h2 { margin-bottom: 10px; color: #343a40; font-weight: bold; font-size: 20px; } .score { font-size: 72px; font-weight: bold; color: #ff6b6b; user-select: none; margin-bottom: 10px; } .button-group { display: flex; justify-content: center; } button { font-size: 24px; padding: 15px 30px; margin: 0 10px; border: none; border-radius: 5px; background-color: #4ecdc4; color: white; cursor: pointer; outline: none; transition: background-color 0.3s ease; } button:hover { background-color: #45b8ac; } input[type="text"] { padding: 10px; font-size: 18px; width: calc(100% - 40px); margin: 0 auto 20px auto; display: block; } .submit-button { padding: 15px 30px; font-size: 24px; background-color: #4ecdc4; color: white; border: none; border-radius: 5px; cursor: pointer; outline: none; transition: background-color 0.3s ease; } .submit-button:hover { background-color: #45b8ac; } .input-container { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); background-color: white; padding: 40px; border-radius: 20px; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); width: 80%; max-width: 400px; } @media screen and (orientation: landscape) { .team { width: 40%; } } </style> </head> <body> <div class="scoreboard" id="scoreboard" style="display:none;"> <div class="team" id="team-a"> <h2 id="team-a-name">Team A</h2> <div class="score" id="score-a">0</div> <div class="button-group"> <button onclick="addScore('a')">+1</button> <button onclick="subtractScore('a')">-1</button> </div> </div> <div class="team" id="team-b"> <h2 id="team-b-name">Team B</h2> <div class="score" id="score-b">0</div> <div class="button-group"> <button onclick="addScore('b')">+1</button> <button onclick="subtractScore('b')">-1</button> </div> </div> </div> <div class="input-container" id="input-container"> <h2>输入队伍名</h2> <form id="team-name-form"> <label for="team-a-name-input">队伍A名字:</label><br> <input type="text" id="team-a-name-input" name="team-a-name" required><br> <label for="team-b-name-input">队伍B名字:</label><br> <input type="text" id="team-b-name-input" name="team-b-name" required><br> <button type="submit" class="submit-button">提交</button> </form> </div> <script> const inputContainer = document.getElementById('input-container'); const scoreboard = document.getElementById('scoreboard'); function addScore(team) { const scoreElement = document.getElementById(`score-${team}`); let score = parseInt(scoreElement.innerText); score++; scoreElement.innerText = score; } function subtractScore(team) { const scoreElement = document.getElementById(`score-${team}`); let score = parseInt(scoreElement.innerText); if (score > 0) { score--; scoreElement.innerText = score; } } document.getElementById('team-name-form').addEventListener('submit', function(event) { event.preventDefault(); const teamAName = document.getElementById('team-a-name-input').value; const teamBName = document.getElementById('team-b-name-input').value; document.getElementById('team-a-name').innerText = teamAName || 'Team A'; document.getElementById('team-b-name').innerText = teamBName || 'Team B'; inputContainer.style.display = 'none'; scoreboard.style.display = 'flex'; }); </script> </body> </html>
2024年04月28日
76 阅读
0 评论
0 点赞