<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>密码提示框</title>
<style>
.wrapper {
width: 500px;
height: auto;
margin: 0 auto;
}
#tips {
padding-left: 5px;
width: 158px;
height: 40px;
font-size: 12px;
background-color: #ffefa4;
border: 0.5px red solid;
display: none;
}
</style>
</head>
<body>
<div class="wrapper">
<lable for="checkbox"><input type="checkbox">两周内自动登录</lable>
<div id="tips">为了您的信息安全,请不要在网吧或公共电脑上使用此功能</div>
</div>
<script>
var checkbox = document.getElementsByTagName("lable")[0];
var tips = document.getElementById("tips");
checkbox.onmouseover = function(){
tips.style.display = "block";
}
checkbox.onmouseout = function (){
tips.style.display = "none";
}
</script>
</body>
</html>
密码提示框
最新推荐文章于 2024-04-28 11:28:01 发布