亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

搜索
博主信息
博文 12
粉絲 0
評論 0
訪問量 10006
最新下載
更多>
網(wǎng)站特效
網(wǎng)站源碼
網(wǎng)站素材
前端模板
1018作業(yè):表單
PHP是世界上最好的語言
原創(chuàng)
566人瀏覽過

立完成一個用戶注冊表單,至少用到5個以上的表單控件。

代碼

  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7. <title>表單</title>
  8. <style>
  9. form div {
  10. margin: 10px 0;
  11. }
  12. </style>
  13. </head>
  14. <body>
  15. <div class="content" style="margin: 5px auto; width: 1000px;">
  16. <div class="main" style="margin: 0 auto; width: 800px;">
  17. <h2 class="title" style="text-align: center;">用戶注冊</h2>
  18. <form action="index.php" method="POST" enctype="multipart/form-data" target="_blank" id="register">
  19. <fieldset>
  20. <legend>賬號信息</legend>
  21. <div class="username">
  22. <label for="username">賬號名稱</label>
  23. <input id="username" type="text" name="username" placeholder="請輸入用戶名" required>
  24. </div>
  25. <div class="password">
  26. <label for="password">用戶密碼</label>
  27. <input id="password" type="password" name="password" value="123" placeholder="請輸入密碼" required>
  28. </br>
  29. <progress name="safe" max="10" min="0" value="3"></progress>
  30. <output>密碼安全程度:<span style="color: red;">較弱</span></output>
  31. </div>
  32. <div class="repassword">
  33. <label for="repassword">確認密碼</label>
  34. <input id="repassword" type="password" name="repassword" value="123" placeholder="請確認密碼" required>
  35. </div>
  36. <div class="upload" style="margin: 10px 0;">
  37. <label for="upload">頭像</label>
  38. <input id="upload" type="file" name="upload">
  39. <button type="button">上傳</button>
  40. </div>
  41. </fieldset>
  42. <fieldset>
  43. <legend>用戶信息</legend>
  44. <div class="gender">
  45. <label for="secret">性別:</label>
  46. <input type="radio" name="gender" value="male" id="male"><label for="male"></label>
  47. <input type="radio" name="gender" value="female" id="female" ><label for="female"></label>
  48. <input type="radio" name="gender" value="secret" id="secret" checked><label for="secret">保密</label>
  49. </div>
  50. <div class="birthday">
  51. <label for="birthday">生日:</label>
  52. <input type="date" name="birthday" value="2022-10-18" id="birthday" min="1949-10-01" max="2000-01-01" />
  53. </div>
  54. <div class="phone">
  55. <label for="phone">手機號</label>
  56. <select name="phone" id="edu" form="">
  57. <option value="0" selected>+86</option>
  58. <optgroup label="美洲">
  59. <option value="1">+90</option>
  60. <option value="2">+99</option>
  61. <option value="3">+88</option>
  62. </optgroup>
  63. <optgroup label="歐洲">
  64. <option value="4">+10</option>
  65. <option value="5">+68</option>
  66. </optgroup>
  67. </select>
  68. <input id="phone" type="number" placeholder="請輸入手機號">
  69. </div>
  70. <div class="email">
  71. <label for="email">郵箱</label>
  72. <input id="email" type="email" name="email" placeholder="user@php.cn" required>
  73. </div>
  74. <div class="color">
  75. <label for="color">喜歡的顏色</label>
  76. <input id="color" type="color" name="color" value="#FFFF00">
  77. </div>
  78. <div class="like">
  79. <label for="keyword">想要學習的語言</label>
  80. <input type="search" name="language" list="details" id="keyword">
  81. <datalist id="details">
  82. <option value="Java">Java</option>
  83. <option value="C++">C++</option>
  84. <option value="Go">Go</option>
  85. <option value="Python">Python</option>
  86. <option value="Js">Js</option>
  87. </datalist>
  88. </div>
  89. <div>
  90. <label for="comment">個人簡介</label>
  91. <textarea placeholder="介紹自己,讓別人更好地認識你,800字以內(nèi)。" name="comment" id="comment" cols="30" rows="5" maxlength="200" style="resize: none"></textarea>
  92. </div>
  93. </fieldset>
  94. <div class="agree">
  95. <input type="checkbox" name="agree" value="agree" id="agree" checked><label for="program">已經(jīng)閱讀并同意</label><a style="text-decoration: none" href="http://www.baidu.com"><span style="color: red;">用戶服務(wù)協(xié)議</span></a>
  96. </div>
  97. <div class="agree">
  98. <input type="checkbox" name="agree" value="agree" id="agree" checked><label for="program">允許向我的郵箱發(fā)送郵件</label>
  99. </div>
  100. <div style="text-align:center">
  101. <button type="button" style="display: inline-block; margin: 15px; height: 40px; width: 80px;">重置</button>
  102. <button type="button" style="display: inline-block; margin: 15px; height: 40px; width: 80px;">確認注冊</button>
  103. </div>
  104. </form>
  105. </div>
  106. </div>
  107. </body>
  108. </html>

效果

批改老師:PHPzPHPz

批改狀態(tài):合格

老師批語:條理清晰,布局也用心了,完成的很好,繼續(xù)加油
本博文版權(quán)歸博主所有,轉(zhuǎn)載請注明地址!如有侵權(quán)、違法,請聯(lián)系admin@php.cn舉報處理!
全部評論 文明上網(wǎng)理性發(fā)言,請遵守新聞評論服務(wù)協(xié)議
0條評論
作者最新博文
關(guān)于我們 免責申明 意見反饋 講師合作 廣告合作 最新更新
php中文網(wǎng):公益在線php培訓,幫助PHP學習者快速成長!
關(guān)注服務(wù)號 技術(shù)交流群
PHP中文網(wǎng)訂閱號
每天精選資源文章推送
PHP中文網(wǎng)APP
隨時隨地碎片化學習
PHP中文網(wǎng)抖音號
發(fā)現(xiàn)有趣的

Copyright 2014-2025 http://ipnx.cn/ All Rights Reserved | php.cn | 湘ICP備2023035733號

  • 登錄PHP中文網(wǎng),和優(yōu)秀的人一起學習!
    全站2000+教程免費學