随笔分类 -  jquery

摘要:$('.showImg').click(function(){ var src = $(this).prevAll('input').val(); layer.open({ content:'', }); $("").attr("src", src).load(function() {//imgSrc是图片地址 var realWidth = this.width;//图片宽 ... 阅读全文
posted @ 2019-01-12 18:16 我是谁,我在做什么 阅读(346) 评论(0) 推荐(0)
摘要:Cookies 定义:让网站服务器把少量数据储存到客户端的硬盘或内存,从客户端的硬盘读取数据的一种技术; 下载与引入:jquery.cookie.js基于jquery;先引入jquery,再引入:jquery.cookie.js;下载:http://plugins.jquery.com/cookie 阅读全文
posted @ 2019-01-10 11:12 我是谁,我在做什么 阅读(168) 评论(0) 推荐(0)
摘要:在网页开发的过程中经常遇到的一个需求就是点击一div内部做某些操作,而点击页面其它地方隐藏该div。比如很多导航菜单,当菜单展开的时候,就会要求点击页面其它非菜单地方,隐藏该菜单。 先从最简单的开始,假如页面有一个id为test的div,我们要实现点击页面其它地方隐藏该div: 对于这个问题一般有两 阅读全文
posted @ 2019-01-06 23:25 我是谁,我在做什么 阅读(456) 评论(0) 推荐(0)
摘要:c 阅读全文
posted @ 2018-11-06 11:13 我是谁,我在做什么 阅读(317) 评论(0) 推荐(0)
摘要:layer.open({ title: '在线调试', //不用可以用false content: '可以填写任意的layer代码', //自定义代码 icon: 1, //提示图标 1,2,3 ... closeBtn:false, //不要按钮 btn:'点击前往登陆', //定议按钮 succ 阅读全文
posted @ 2018-10-26 15:43 我是谁,我在做什么 阅读(654) 评论(0) 推荐(0)
摘要:$('.sel_type label').click(function(e){ e.preventDefault(); }); $('.sel_type label').click(function(e){ e.preventDefault(); }); 阅读全文
posted @ 2018-10-24 14:28 我是谁,我在做什么 阅读(366) 评论(0) 推荐(0)
摘要:今天突然被问到了正则表达式,因为长时间不用突然不知道怎么用了,只知道有这么个东西。然后去网上查了一下,感觉写的不少,但解释的有点模糊,今天我来浅谈一下。 1,match的用法 A,在不加全局“g”的情况下: var str="wo shi zhong guo ren"; console.log(st 阅读全文
posted @ 2018-10-07 23:41 我是谁,我在做什么 阅读(1539) 评论(0) 推荐(0)
摘要:$(window).height(); //浏览器当下窗口可视区域高度 $(document).height(); //浏览器当下窗口文档的高度 $(document.body).height();//浏览器当下窗口文档body的高度 $(document.body).outerHeight(tru 阅读全文
posted @ 2018-09-29 22:16 我是谁,我在做什么 阅读(2460) 评论(0) 推荐(0)