发布于 2016-01-02 11:56:12 | 517 次阅读 | 评论: 0 | 来源: PHPERZ

这里有新鲜出炉的Javascript教程,程序狗速度看过来!

JavaScript客户端脚本语言

Javascript 是一种由Netscape的LiveScript发展而来的原型化继承的基于对象的动态类型的区分大小写的客户端脚本语言,主要目的是为了解决服务器端语言,比如Perl,遗留的速度问题,为客户提供更流畅的浏览效果。


<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>页面收缩展开的效果</title>
<style type="text/css">
ul,li{ margin:0px; padding:0px; list-style:none;}
.tagbox{ width:223px; height:auto; border:1px solid #CCCCCC; POSITION:fixed;_position:absolute; _margin-top:expression(document.documentElement.clientHeight-this.style.pixelHeight+document.documentElement.scrollTop); z-index:99; right:0px; bottom:350px; background-color:#FFFFFF; -webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;}
.tag{ width:80px; height:auto; padding:5px 10px;}
.tag span{ width:80px; height:30px; display:block; line-height:30px; color:#006600; font-size:18px;}
.tag li{ width:223px; height:50px; line-height:24px; font-size:12px; overflow:hidden;}
.tag li a{ color:#336699;}
.tag li a:hover{ text-decoration:underline; color: #FF0000;}
.tag li input{width:190px; height:30px;}
#login{width:194px; height:40px;background-color:#FF9C00;border:2px solid #CCCCCC; font-size:18px; cursor:pointer;}
.guanbi{width:223px; height:26px; background-color: #F0F0F0; line-height:26px; font-size:18px; text-align:center; -webkit-border-radius:0px 0px 5px 5px;-moz-border-radius:0px 0px 5px 5px;border-radius:0px 0px 5px 5px;cursor:pointer;}
.guanbi a{ color:#666666; text-decoration:none;}
.zhangkai{ width:20px; height:auto; padding:10px 5px; line-height:20px; font-size:18px; text-align:center;-webkit-border-radius:5px 0px 0px 5px;-moz-border-radius:5px 0px 0px 5px;border-radius:5px 0px 0px 5px; border:1px solid #CCCCCC; POSITION:fixed;_position:absolute; _margin-top:expression(document.documentElement.clientHeight-this.style.pixelHeight+document.documentElement.scrollTop); z-index:100; right:0px; bottom:350px; background-color:#FFFFFF; display:none;cursor:pointer;}
.zhangkai a{color:#006600; text-decoration:none;}
.xx{ height:1000px;}
</style>
<script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.8.0.js">
</script>
<script type="text/javascript">
	  $(document).ready(function(){
			$(".guanbi").click(function(){
				$(".tagbox").hide();
				$(".zhangkai").show();
				return false;
			});			
			$(".zhangkai").click(function(){
				$(".zhangkai").hide();
				$(".tagbox").show(500);
				return false;
			});
	  });
    </script>
</head>
<body>
<div class="tagbox">
<div class="tag">
<span>用户登录</span>
<ul>
<li><input type="text" placeholder="账户" /></li>
<li><input type="text" placeholder="密码" /></li>
<li><input type="button" id="login" value="登录" /></li>
</ul>
</div>
<div class="guanbi"><a href="/" target="_blank">点击关闭</a></div>
</div>
<div class="zhangkai"><a href="#">点击登录</a></div>
<div class="xx"></div>
</body>
</html>


最新网友评论  共有(0)条评论 发布评论 返回顶部

Copyright © 2007-2017 PHPERZ.COM All Rights Reserved   冀ICP备14009818号  版权声明  广告服务