记住密码提示框

古城微笑少年丶 2023-06-11 12:23 20阅读 0赞

js练习 记住密码提示框


效果图:
在这里插入图片描述
代码如下,没有什么要注意的。

  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title></title>
  6. <style type="text/css">
  7. *{
  8. padding: 0px;
  9. margin: 0px;
  10. }
  11. div{
  12. height: 30px;
  13. width: 180px;
  14. background-color: yellow;
  15. border: 1px solid red;
  16. //display: none;
  17. }
  18. div p{
  19. text-align: center;
  20. font-size: 12px;
  21. }
  22. </style>
  23. </head>
  24. <body>
  25. <label onmousemove="fun2()" onmouseout="fun1()">
  26. <input type="checkbox" name="" id="" />
  27. 两周内自动登录
  28. </label>
  29. <div id="">
  30. <p>为了您的信息安全,请不要在网吧或公用电脑上使用此功能!</p>
  31. </div>
  32. <script type="text/javascript">
  33. function fun1(){
  34. document.getElementsByTagName('div')[0].style.display='none';
  35. }
  36. function fun2(){
  37. document.getElementsByTagName('div')[0].style.display='block';
  38. }
  39. </script>
  40. </body>
  41. </html>

发表评论

表情:
评论列表 (有 0 条评论,20人围观)

还没有评论,来说两句吧...

相关阅读

    相关 Git 设置记住密码

    在git push时每次都要输入用户名和密码是一件很痛苦的事,其实解决方法很简单步骤如下: 1. 在项目文件夹(包含隐藏文件夹.git文件夹的)内右键 git bash h