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) 编辑
摘要: function compare(value1,value2){ return value1 - value2; } var values = [1,0,10,1,5]; values.sort(compare); alert(values); 阅读全文
posted @ 2015-06-20 22:50 Alone_Learner 阅读(106) 评论(0) 推荐(0) 编辑
摘要: //oDrag为容器最大宽高的标准。//handle为点击拖拉移动的地方。function drag(oDrag, handle){ handle.onmousedown = function(event){ var event = event||window.event; var maxW =... 阅读全文
posted @ 2015-06-20 22:49 Alone_Learner 阅读(213) 评论(0) 推荐(0) 编辑