8.28 jQuery
2018-8-28 18:25:27
jQuery 参考:https://www.cnblogs.com/liwenzhou/p/8178806.html
2018-8-28 19:53:19
还是讲的jQuery !
有点点枯燥!但是很好理解!
这几天想多看看书!电脑玩的太多!需要精心看书!
扎克伯格 说过 有时候有状态学多点,没状态就干点其他的!
越努力,越幸运!

<!DOCTYPE html>
<html>
<head>
<title>位置相关方法</title>
<meta charset="utf-8">
<style type="text/css">
* {
margin: 0;
padding: 0;
}
.c1{
height: 100px;
width: 100px;
background-color: red;
}
</style>
</head>
<body>
<div class="c1">我是div</div>
<script src="jquery-3.2.1.min.js"></script>
<script type="text/javascript"></script>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<title>自定义模态框</title>
<meta charset="utf-8">
<style type="text/css">
.cover{
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
background-color: rgba(0,0,0,0.4);
z-index: 998;
} .modal{
height: 400px;
width: 600px;
background-color: white;
position: absolute;
top: 50%;
left: 50%;
margin-left: -300px;
margin-top: -200px;
z-index: 1000;
}
.hide {
display: none;
}
</style>
</head>
<body>
<button id="b1">屠龙宝刀,点击就送</button>
<div class="cover hide"></div>
<div class="modal hide">
<form action="">
<p>
<label>用户名:
<input type="text" name="">
</label>
</p>
<p>
<label>密码:
<input type="text" name="">
</label>
</p>
<p>
<input type="submit" value="登入">
<input id="cancel" type ="button" value="取消">
</p>
</form>
</div> <script src="jquery-3.2.1.min.js"></script>
<script type="text/javascript">
// 找到点击弹出模态框的按钮
$("#b1").click(function(){
// 把 .cover和.modal显示出来(去除hide)
$(".cover").removeClass("hide"); // 显示背景
$(".modal").removeClass("hide"); //显示模态框
})
// 找到取消按钮,绑定事件
$("#cancel").click(function(){
//给背景和模态框都加上hide类
$((".cover").addClass("hide");
$((".modal").addClass("hide");
})
</script>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<title>修改css样式</title>
<meta charset="utf-8">
</head>
<body>
<p>小强</p>
<p>二哥</p>
<script src="jquery-3.2.1.min.js"></script>
<script type="text/javascript">
$("p").click(function(){
//把当前点击的标签变绿
// 在处理事件的函数中用this 表示 当前触发事件的标签
$(this).css("color","red");
$(this).css("font-size","24px");
}) </script>
</body>
</html>
8.28 jQuery的更多相关文章
- jQuery 2.0.3 源码分析Sizzle引擎 - 高效查询
为什么Sizzle很高效? 首先,从处理流程上理解,它总是先使用最高效的原生方法来做处理 HTML文档一共有这么四个API: getElementById 上下文只能是HTML文档 浏览器支持情况:I ...
- 50 个最棒的 jQuery 日历插件,很齐全了!(转)
http://www.php100.com/html/it/qianduan/2015/0326/8856.html 什么介绍都没有,直接上酸菜! 1. Even Touch Calendar 2. ...
- 2014年50个程序员最适用的免费JQuery插件
有用的jQuery库是设计师和开发者之间一个非常熟悉的短语.这是现在互联网中最流行的JavaScript函数库之一.每个设计师和开发人员都应该知道它的重要性,而且熟悉它的功能和特点. jQuery几乎 ...
- jQuery慢慢啃之工具(十)
1.jQuery.support//一组用于展示不同浏览器各自特性和bug的属性集合 2.jQuery.browser//浏览器内核标识.依据 navigator.userAgent 判断. 可用值: ...
- js,jquery备忘录
1.var s = str.charCodeAt();转ASCII码 2.String.fromCharCode(65);转字母 3.es6 ... (扩展运算符),将一个数组转化成由逗号分割的队列. ...
- jQuery数组($.grep,$.each,$.inArray,$.map)处理函数详解
1.jQuery.grep( array, function(elementOfArray, indexInArray) [, invert ] ) 描述: 查找满足过滤函数的数组元素.原始数组不受影 ...
- JSON和JS对象之间的互转
1. jQuery插件支持的转换方式 $.parseJSON( jsonstr ); //jQuery.parseJSON(jsonstr),可以将json字符串转换成json对象 2. 浏览器支持的 ...
- CSharp 相关知识点小结
1.JS获取iframe下面的内容document.getElementById('IFRAME1').contentDocument; 2.dialog 弹出层,定位:postion:'bottom ...
- 黄聪: 50 个 Bootstrap 插件
Bootstrap是快速开发Web应用程序的前端工具包.它是一个CSS和HTML的集合,它使用了最新的浏览器技术,给你的Web开发提供了时尚的版式,表单,buttons,表格,网格系统等等. 本文向你 ...
随机推荐
- [原]unity3d调用android webView
1.配置dialog xml文件: <resources> <style name="dialogStyleWindow" parent="@an ...
- aspose导出excel文件
using Aspose.Cells; using System; using System.Collections.Generic; using System.Data; using System. ...
- Android 4.0以上BlurMaskFilter效果无效
Android MaskFilter的基本使用: MaskFilter类可以为Paint分配边缘效果. 对MaskFilter的扩展可以对一个Paint边缘的alpha通道应用转换.An ...
- IIS------如何占用80端口
如何占用80端口 请看我的一篇随笔: https://www.cnblogs.com/tianhengblogs/p/9292347.html
- JQuery------各种版本下载
转载: http://www.jq22.com/jquery-info122
- backbone学习笔记:集合(Collection)
集合(Collection)是一个Backbone对象,用来组织和管理多个模型,它不仅仅是一个javascript数组,还提供了专门的方法来对集合进行排序.过滤和遍历,集合可以方便的与REST服务器进 ...
- jquery 强大表格插件 DataTables
官网:https://datatables.net/ 配置:https://datatables.net/reference/option/ API :https://datatables.net/r ...
- 发送http请求
public static String httpGetSend(String url) { String responseMsg = ""; HttpClient httpCli ...
- MVC项目的简单总结
不能说是庆幸吧,正赶上公司要开发一个小小的MVC项目,于是这样任务就只有我自己承担,在这个项目中我才彻底感觉到自己之前有关MVC知识的无知,以为接触了皮毛就感觉能做项目,只要有心动脑思考就能完成一个完 ...
- 扩展方法以及LinQ的学习
我们今天学习的内容其实还是蛮多的,学习了自动属性,扩展方法,复习初始化器,以及LinQ的一些方法,其实感觉有些还是很熟悉的,在前面的学习过程中有时间感觉学习的知识知道了怎么使用,但是还没有在项目中使用 ...