2015年6月25日
摘要: 回到顶部 阅读全文
posted @ 2015-06-25 22:58 Alone_Learner 阅读(125) 评论(0) 推荐(0) 编辑
摘要: document.body.clientWidth ==> BODY对象宽度document.body.clientHeight ==> BODY对象高度document.documentElement.clientWidth ==> 可见区域宽度document.documentElement.c... 阅读全文
posted @ 2015-06-25 22:15 Alone_Learner 阅读(190) 评论(0) 推荐(0) 编辑
  2015年6月23日
摘要: 在更新少量节点的时候可以直接向document.body节点中添加,但是当要向document中添加大量数据是,如果直接添加这些新节点,这个过程非常缓慢,因为每添加一个节点都会调用父节点的appendChild()方法,为了解决这个问题,可以创建一个文档碎片,把所有的新节点附加其上,然后把文档碎片一... 阅读全文
posted @ 2015-06-23 20:12 Alone_Learner 阅读(306) 评论(0) 推荐(0) 编辑
  2015年6月20日
摘要: // 自定义数组函数Array.prototype.maxima。//Array.prototype为必须的,maxima为数组名。//调用时arr.maxima()这样调用window.onload = function() { Array.prototype.sum = function(){ ... 阅读全文
posted @ 2015-06-20 23:09 Alone_Learner 阅读(449) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2015-06-20 22:56 Alone_Learner 阅读(147) 评论(0) 推荐(0) 编辑
摘要: var EventUtil = {// oElement触发元素。sEvent绑定事件click?或者其他。fnHandler,绑定的函数。 addHandler: function (oElement, sEvent, fnHandler) { oElement.addEventListener... 阅读全文
posted @ 2015-06-20 22:55 Alone_Learner 阅读(255) 评论(0) 推荐(0) 编辑
摘要: text-overflow: -o-ellipsis-lastline; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 9;//这里控制行数 -webkit-box-orien... 阅读全文
posted @ 2015-06-20 22:55 Alone_Learner 阅读(121) 评论(0) 推荐(0) 编辑
摘要: (today.getMonth()+1).toString().replace(/^(\d)$/,'0$1') 阅读全文
posted @ 2015-06-20 22:54 Alone_Learner 阅读(644) 评论(0) 推荐(0) 编辑
摘要: /*-------------------------- + 获取id, class, tagName +-------------------------- */var get = { byId: function(id) { return typeof id === "string" ? d... 阅读全文
posted @ 2015-06-20 22:53 Alone_Learner 阅读(405) 评论(0) 推荐(0) 编辑
摘要: .clearfix:after{content: "";display: block;clear: both;}.clearfix{zoom:1;} 阅读全文
posted @ 2015-06-20 22:52 Alone_Learner 阅读(97) 评论(0) 推荐(0) 编辑