鱼C论坛

 找回密码
 立即注册
查看: 2012|回复: 6

[已解决]如何使用JSTL实现一个用户登录页面(中文和英文可自由切换)

[复制链接]
发表于 2020-5-23 11:43:02 | 显示全部楼层 |阅读模式
购买主题 本主题需向作者支付 10 鱼币 才能浏览
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复

使用道具 举报

发表于 2020-5-23 12:00:57 | 显示全部楼层
还要付费才能看
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

 楼主| 发表于 2020-5-23 12:41:20 | 显示全部楼层
呃,我弄错了,我以为这个付费是赏金
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

 楼主| 发表于 2020-5-23 12:42:06 | 显示全部楼层
算了,反正我已经解决了
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2020-5-23 13:03:40 | 显示全部楼层
我之前写过一个,一会发上来吧~~~~~
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2020-5-23 15:42:02 | 显示全部楼层    本楼为最佳答案   
本帖最后由 青出于蓝 于 2021-8-4 08:45 编辑
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4.      <meta charset="UTF-8">
  5.      <title>Document</title>
  6.     <style>
  7.         .css1{
  8.             width: 70px;
  9.             height: 70px;
  10.             left: 1px;
  11.             position: absolute;
  12.         }
  13.         .css{
  14.             width: 70px;
  15.             height: 70px;
  16.             left: 18px;
  17.             position: absolute;
  18.         }
  19.         .css2,.css3{
  20.             left: 80px;
  21.             position: absolute;
  22.         }
  23.         body{
  24.             font-family: '黑体','宋体','微软雅黑';

  25.         }
  26.         .div3{
  27.             width: 500px;
  28.             height: 500px;
  29.             background-color: aquamarine;
  30.             left: 350px;
  31.             top: 75px;
  32.             position: absolute;
  33.         }
  34.         .abc{
  35.             left: 420px;
  36.             position: absolute;
  37.         }
  38.         .sure{
  39.             color: #5bfcff;
  40.             background-color: blueviolet;
  41.             width: 200px;
  42.             height: 55px;
  43.             left: 150px;
  44.             position: absolute;
  45.             font-family: '黑体', '宋体';
  46.             font-size: 30px;
  47.         }
  48.         .sure2{
  49.             color: #5bfcff;
  50.             background-color: green;
  51.             width: 100px;
  52.             height: 50px;
  53.             left: 30px;
  54.             position: absolute;
  55.             font-family: '黑体', '宋体';
  56.             font-size: 30px;
  57.         }
  58.     </style>
  59. </head>
  60. <body>
  61.      <script type="text/javascript">


  62.          function check() {

  63.              var statue =document.getElementById("bbb");
  64.              if(document.getElementById("username").value=="") {
  65.                  alert("没有输入用户名!");
  66.                  return false;
  67.              } else if(document.getElementById("password").value=="") {
  68.                  alert("没有输入密码!");
  69.                  }//else if (statue.checked) {
  70.                  //alert("请确认")
  71.                  //return false;}
  72.              else if (document.getElementById("username").value=="鱼c"&&document.getElementById("password").value=="66666666"&& statue.checked){
  73.                  alert("登录成功!")
  74.                  window.open("https://fishc.com.cn")
  75.                  return true;



  76.              }else {
  77.                  alert("用户名或密码错误或没有确认")
  78.                  return false
  79.              }





  80.             
  81.          }
  82.          // 登录

  83.      </script>
  84.         <div class="div3">
  85.      <big align style="color: red;font-size: 60px" class="abc">
  86.          登录系统
  87.      </big>



  88.             <label><div class="css1">用户名:</div><div class="css3"><input type="text" id="username" name="1"></div></label><br/><br><br><br>
  89.     <label ><div class="css" >密码:</div>
  90.         <div class="css2"><input type="password" id="password" maxlength="10" name="2"></diV><br><br></label>
  91.      <label><input type="radio"value="bbb" id="bbb">请确认(检查密码用户名)</label>
  92.             <br><br><br><br><br>
  93.             <input type="submit" onclick="check()" value="登录" class="sure">
  94.             
  95.             <input type="reset" name="1" value="重置" class="sure2">
  96. </div>



  97. </body>
  98. </html>
复制代码
自己写的,用户名:鱼c。密码:66666666.
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 1 反对 1

使用道具 举报

 楼主| 发表于 2020-5-23 18:39:31 | 显示全部楼层
有参考价值

评分

参与人数 1鱼币 +1 收起 理由
青出于蓝 + 1 谢谢

查看全部评分

想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 1 反对 0

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|鱼C工作室 ( 粤ICP备18085999号-1 | 粤公网安备 44051102000585号)

GMT+8, 2024-4-26 17:47

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表