网站首页 手机版
 注册 登录
您现在的位置: 畅无忧设计 >> 网页特效 >> 表单按钮 >> 正文
最新文章
· 输入框输入提示代码
· 文本框提示代码
· 让表单ctrl加回车提交
· 简单代码实现JS多级Select联动菜单
· JS验证数字位数
· 带有介绍的Select列表菜单代码
· Js注册等待
· 点击按钮插入文字在文本框
· radio背景颜色选择器
· 表单内容提交等待效果
热门文章
 Js实现点击添加增加一行,点击删除
 DIV中实现input垂直居中
 常用的选择省份城市的联动下拉列表
 JS动态增加删除一组输入框
 jQuery实现Email邮箱地址自动补全代
 Select实现多选
 JS动态批量创建带表单文本框的表格
 JS实现上传本地图片前先预览
 日期选择下拉框
 漂亮的点击弹出的登陆框
相关文章
不错的评分和意见反馈表单
多表单checkbox全选、反选、不全选效果
可显隐的用户登陆表单
来源:中国站长天空 更新时间:2009/12/3 1:34:21 阅读次数: 我要投稿
△运行 ☉预览 #复制 +收藏
特效代码:
<html>
<head>
<title>可显隐的用户登陆表单</title>
<meta http-equiv="content-Type" content="text/html;charset=gb2312">
<!--把下面代码加到<head>与</head>之间-->
<style>
#clarityDiv {
width:100%;
height:100%;
background:#000;
position:absolute;
z-index:10;
right:16px;
z-index:99;
-moz-opacity:0.4;
opacity:0.4;
filter:alpha(opacity=30);
}
#window {
border:solid 1px #dedcd8;
padding:1px;
background:#fff;
position:absolute;
z-index:100;
font-size:12px
}
#window #window_title {
height:28px;
line-height:28px;
padding:0 0 0 8px;
font-weight:bold;
color:#666
}
#window #window_title span {
cursor:pointer
}
#window #window_title .close {
float:right;
width:30px;
height:18px;
margin:0 30px 0 0
}
#window #window_content {
padding:10px 10px 10px 10px
}
#window #window_content .login {
width:220px;
margin:0 auto
}
#window #window_content .login input.text {
border:solid 1px #bab5a9;
width:150px;
height:19px;
padding:3px 0 0 5px;
}
#window #window_content .login input.text:hover {
border:solid 1px #99cc00;
}
#window #window_content .login input.btn {
border:solid 1px #bab5a9;
height:26px;
line-height:22px
}
#window #window_content .login input.btn:hover {
border:solid 1px #99cc00;
}
#window #window_content .login div {
margin:0 0 9px 0;
*margin:0 0 6px 0;
}
#window #window_content .login #hint {
color:#aaa;
padding:0 0 0 40px
}
#window #window_content .login span {
float:left;
display:block;
height:24px;
line-height:24px;
margin:1px 10px 0 0;
width:30px
}
html,body {
height:100%;
width:100%;
overflow:hidden;
margin:0

.corporeity {
position:relative;
width:100%;
height:100%;
overflow-x:auto;
overflow-y:scroll;
background:#f1efec;
cursor:default
}
</style>
</head>
<body>
<!--把下面代码加到<body>与</body>之间-->
<script>
function setLogin(){
var container=document.getElementById("container");
container.innerHTML='<div id="clarityDiv"></div><div id="window" style="width:300px"><div id="window_title"><span class="close" onclick="closewindow()">关闭</span><div id="window_h">用户登录</div></div><div id="window_content"><div class="login"><form class="login" id="login" method="post"><div id="hint">请输入帐号密码!</div><div><span>帐号</span><input type="text" name="user" id="user" class="text"></div><div><span>密码</span><input type="password"id="password" name="password" class="text"></div><div><span></span><input type="button" value="登  录" class="btn">  <input type="button" value="注  册" class="btn"></div></form></div></div></div>'
var divId=document.getElementById("window");
document.getElementById('container').style.display="block";
divId.style.left=(document.body.clientWidth-divId.clientWidth)/2+document.body.scrollLeft+"px";
divId.style.top=(document.body.clientHeight-divId.clientHeight)/2+document.body.scrollTop+"px";
return false;
}
</script>
</head>
<body>
<div id="container"></div>
<div class="corporeity"><a href="#" onclick="setLogin()">点击这里登陆</a></div>
<script>
function closewindow(){
   document.getElementById('container').style.display="none";
}
</script>
</body>
</html>
△运行 ☉预览 #复制 +收藏
特效说明:
可显隐的用户登陆表单
  • 上一篇文章:
  • 下一篇文章:
  • 关于我们 - 联系我们 - 广告服务 - 在线投稿 - 友情链接 - 网站地图 - 版权声明
    CopyRight 2008-2010, CWYDESIGN.COM - 畅无忧设计, Inc. All Rights Reserved
    滇ICP备09005765号