摘要:
// 自定义数组函数Array.prototype.maxima。//Array.prototype为必须的,maxima为数组名。//调用时arr.maxima()这样调用window.onload = function() { Array.prototype.sum = function(){ ... 阅读全文
摘要:
阅读全文
摘要:
var EventUtil = {// oElement触发元素。sEvent绑定事件click?或者其他。fnHandler,绑定的函数。 addHandler: function (oElement, sEvent, fnHandler) { oElement.addEventListener... 阅读全文
摘要:
text-overflow: -o-ellipsis-lastline; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 9;//这里控制行数 -webkit-box-orien... 阅读全文
摘要:
(today.getMonth()+1).toString().replace(/^(\d)$/,'0$1') 阅读全文
摘要:
/*-------------------------- + 获取id, class, tagName +-------------------------- */var get = { byId: function(id) { return typeof id === "string" ? d... 阅读全文
摘要:
.clearfix:after{content: "";display: block;clear: both;}.clearfix{zoom:1;} 阅读全文
摘要:
function compare(value1,value2){ return value1 - value2; } var values = [1,0,10,1,5]; values.sort(compare); alert(values); 阅读全文
摘要:
//oDrag为容器最大宽高的标准。//handle为点击拖拉移动的地方。function drag(oDrag, handle){ handle.onmousedown = function(event){ var event = event||window.event; var maxW =... 阅读全文