帮老板写了一个游戏购买的网页,结果老板中途不做了所以剩下的源代码分享一下
2022-05-25
直接分享源码就好了
<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Language" content="zh-CN" /> <title>Hello World</title> </head> <style> * { margin: 0px; padding: 0px; } /* 导航条 */ .topnav { display:flex; position: sticky; top: 0; width:100%; margin: auto; overflow: hidden; background-color: #333; } /* 导航链接 */ .topnav a { width:80%; float: left; display: block; color: #f2f2f2; text-align: center; padding: 14px 16px; text-decoration: none; } /* 链接 - 修改颜色 */ .topnav a:hover { background-color: #ddd; color: black; } </style> <body> <form action="" method="post"> <div class="topnav"> <a href="http://www.anyuer.club">欢迎你的到来</a> <input type="submit" name="submit" value="提交" style="width:20%;float:right;"> </div> <h2>第一步先选主机</h2> <br/> <h3>主机内存:</h3> <br/> <div style="display:flex;"> <!--标题复选框--> <div class="bbox" style="display:flex;width:33.3%"> <input class="checkbox" type="checkbox" name="answer[]" value="50GB" style="width:25px;height:20px;line-height:100%;" /> <p style="width:20%;height:20px;">50GB</p> </div> <!--标题复选框--> <div class="bbox" style="display:flex;width:33.3%"> <input class="checkbox" type="checkbox" name="answer[]" value="100GB" style="width:25px;height:20px;line-height:100%;"/> <p style="width:20%;height:20px;">100GB</p> </div> <!--标题复选框--> <div class="bbox" style="display:flex;width:33.3%"> <input class="checkbox" type="checkbox" name="answer[]" value="720GB" style="width:25px;height:20px;line-height:100%;"/> <p style="width:20%;height:20px;">720GB</p> </div> </div> <h2><br/>第二步选游戏</h2> <br/> <div class="box1" style="margin-bottom:10px;" > <form action="" method="post"> <input type="text" name="Gname" value="" style="width:69%"> <input type="submit" name="submit" value="搜索游戏" style="width:30%;float:right;"> </form> </div> <?php ///echo "搜索的游戏是 :"; ////echo $_POST['Gname']; ?> <!--游戏复选框--> <div class="game" style="border-style:solid;border-width:1px;margin-top:20px;"> <img class="gamesrc" src="http://www.anyuer.club/zb_users/upload/2019/05/201905311559314412410009.jpg" style="width:60%;margin-left:20%;margin-right:20%;"></img> <div class="box1" style="width:100%;border-style:solid;border-width:1px;display:flex;"> <input type="checkbox" name="Ganame" value="F1赛车20" style="width:5%;float:left;border-style:solid;border-width:1px;"> <p style="width:5%;border-left-style:solid;border-width:1px;">1</p> <p style="width:60%;border-left-style:solid;border-width:1px;">F1赛车20</p> <p style="width:20%;border-left-style:solid;border-width:1px;">54G</p> <p style="width:10%;border-left-style:solid;border-width:1px;">编号1</p> </div> </div> <!--游戏复选框--> <div class="game" style="border-style:solid;border-width:1px;margin-top:20px;"> <img class="gamesrc" src="http://www.anyuer.club/zb_users/theme/qk_zhuan/include/random/3.jpg " style="width:60%;margin-left:20%;margin-right:20%;"></img> <div class="box1" style="width:100%;border-style:solid;border-width:1px;display:flex;"> <input type="checkbox" name="Ganame" value="星际战甲" style="width:5%;float:left;border-style:solid;border-width:1px;"> <p style="width:5%;border-left-style:solid;border-width:1px;">2</p> <p style="width:60%;border-left-style:solid;border-width:1px;">星际战甲</p> <p style="width:20%;border-left-style:solid;border-width:1px;">64G</p> <p style="width:10%;border-left-style:solid;border-width:1px;">编号2</p> </div> </div> </form> <?php ////echo "Your answer is that :"; $result = ''; for($i=0;$i<count($_POST['answer']);$i++) { $result = $result . $_POST['answer'][$i].','; } ////echo $result; ////echo "<br/>Your game name is that:"; ////echo $_POST['Ganame']; ?> </body> </html>
发表评论: