摘要: window.CusEventTarget = function () { this._listener = {}; }; CusEventTarget.prototype = { constructor: this, addEvent: function (type, fn) { if (typeof type === "string" && type... 阅读全文
posted @ 2018-07-13 14:56 黎明之光123 阅读(186) 评论(0) 推荐(0)
摘要: (function (window) { function myPaginationArray(totalPage, currentPage) { var myPage = []; if (totalPage 5) { if (currentPage + 5 >= totalPage) { ... 阅读全文
posted @ 2018-07-13 14:55 黎明之光123 阅读(130) 评论(0) 推荐(0)
摘要: location.hostname.replace(/.*?([^\.]+.(com|cn))/, "$1"); //www.baidu.com => baidu.com return (num || 0).toString().replace(/(\d)(?=(?:\d{3})+$)/g, '$1 阅读全文
posted @ 2018-07-13 10:13 黎明之光123 阅读(176) 评论(0) 推荐(0)