记住密码提示框
js练习 记住密码提示框
效果图:
代码如下,没有什么要注意的。
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<style type="text/css">
*{
padding: 0px;
margin: 0px;
}
div{
height: 30px;
width: 180px;
background-color: yellow;
border: 1px solid red;
//display: none;
}
div p{
text-align: center;
font-size: 12px;
}
</style>
</head>
<body>
<label onmousemove="fun2()" onmouseout="fun1()">
<input type="checkbox" name="" id="" />
两周内自动登录
</label>
<div id="">
<p>为了您的信息安全,请不要在网吧或公用电脑上使用此功能!</p>
</div>
<script type="text/javascript">
function fun1(){
document.getElementsByTagName('div')[0].style.display='none';
}
function fun2(){
document.getElementsByTagName('div')[0].style.display='block';
}
</script>
</body>
</html>
还没有评论,来说两句吧...