摘要:
(function () { // 兼容的事件助手 window.CompatibleEventHelper = { addEventListener: function (elem, type, cb) { if (elem.addEventListener) { elem.addEventLis 阅读全文
摘要:
String.prototype.replaceAll = function (targetStr, newStr) { var sourceStr = this.valueOf(); while (sourceStr.indexOf(targetStr) !== -1) { sourceStr = 阅读全文
摘要:
var btns = document.querySelectorAll(".btn");console.log(btns instanceof Array); // falsebtns = Array.prototype.slice.call(btns, 0);console.log(btns i 阅读全文