2017年2月17日

ajax防止重复提交

摘要: //防止重复提交 var pendingRequests = {}; jQuery.ajaxPrefilter(function( options, originalOptions, jqXHR ) { var key = options.url; i=0; i++; console.log(key 阅读全文

posted @ 2017-02-17 09:41 杨龙飞 阅读(246) 评论(0) 推荐(0) 编辑

2017年2月16日

jquery data属性的使用

摘要: var func=function(){console.log("test")};$("div").data("test",func);$("div").data("test")(); 输出结果是test 注意:data方法是jquery中的方法不是原生js里面的方法 js原生的dataset方法 阅读全文

posted @ 2017-02-16 15:15 杨龙飞 阅读(217) 评论(0) 推荐(0) 编辑

2017年2月15日

文字换行

摘要: 1、首先文字换行和display属性是没有关系的 2、影响文字换行不起作用的有可能是white-space属性 .div{ width:100px;//必须要设置的 white-space:normal; word-break:break-all; } 阅读全文

posted @ 2017-02-15 10:16 杨龙飞 阅读(201) 评论(0) 推荐(0) 编辑

2017年2月13日

vue的生命周期

摘要: 1.vue的生命周期 阅读全文

posted @ 2017-02-13 18:32 杨龙飞 阅读(147) 评论(0) 推荐(0) 编辑

iphone与安卓的兼容性问题汇总

摘要: 1.日期问题 当使用yyyy-mm-dd格式时,iphone不认,安卓没问题 解决办法:new Date(res.data[i].inventoryDate.replace(/-/g, "/")); 2.title问题 如果title是动态加载的,在dom加载完之后通过js改变title的值,在安卓 阅读全文

posted @ 2017-02-13 18:29 杨龙飞 阅读(584) 评论(0) 推荐(0) 编辑

2017年2月9日

line-height属性总结

摘要: line-height属性的继承性: 子元素不设置line-height时, 在父元上设置带单位的值和百分比时会先计算父元素的line-height大小然后继承过来,在父元素上设置无单位的数值时,子元素会继承这个值,然后将这个值乘以子元素的font-size,得到line-height line-h 阅读全文

posted @ 2017-02-09 11:36 杨龙飞 阅读(308) 评论(0) 推荐(0) 编辑

2017年2月6日

placeholder的字体样式改变,滚动条的颜色改变,ios日期兼容

摘要: new Date(res.data[i].inventoryDate.replace(/-/g, "/")); 阅读全文

posted @ 2017-02-06 18:21 杨龙飞 阅读(361) 评论(0) 推荐(0) 编辑

表格使用总结

摘要: 细线表格: <!DOCTYPE html><html><head> <meta charset="utf-8"> <title>细线表格</title> <style type="text/css"> table{ border-collapse:collapse; } td{height:30px 阅读全文

posted @ 2017-02-06 16:24 杨龙飞 阅读(283) 评论(0) 推荐(0) 编辑

网页html结构搭建方法总结

摘要: 在div+css布局中,一般都这样来整体构架的: <div id="header"></div><div id="center"></div><div id="footer"></div> 而对于header部分,肯定要显示网站标题,除了显示网站标题外,还可能要显示其他比较重要的对象,比如网站的导航 阅读全文

posted @ 2017-02-06 09:58 杨龙飞 阅读(575) 评论(0) 推荐(0) 编辑

2017年2月4日

css中的inline-block

摘要: div { display: inline-block; *display: inline; *zoom: 1; } Basic Support包含值:none | inline | block | list-item | inline-block table系包含值:table | inline- 阅读全文

posted @ 2017-02-04 13:38 杨龙飞 阅读(162) 评论(0) 推荐(0) 编辑

导航

Fork me on GitHub