摘要:
(function (doc, win) { var docEl = doc.documentElement, resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize', recalc = function 阅读全文
摘要:
window.addEventListener("offline", function() { alert('offline')}, false);window.addEventListener("online", function() { alert('online')}, false... 阅读全文
摘要:
var city = ["北京","天津","上海","重庆","杭州"];city.sort(function compareFunction(a,b){ return a.localeCompare(b); });console.log(city); ==>["北京",... 阅读全文
摘要:
1、load() load()方法是jquery中最简单和常用的Ajax方法,能载入远程html代码并插入到DOM中,结构为load( url [, data] [, callback]); 参数名称 类型 说明 url String 请求HTML页面的url地址data(可选... 阅读全文
摘要:
字体单位:rem@charset "utf-8";/* *create by chengkun 19/9/2015. *version 1.0. *Reset the browser default style.*//* 设置盒模型样式 */* { box-sizing: b... 阅读全文
摘要:
使用前在页面中引入下面的代码/*! * jQuery Cookie Plugin v1.4.1 * https://github.com/carhartl/jquery-cookie * * Copyright 2006, 2014 Klaus Hartl * Released under the ... 阅读全文
摘要:
一、js cookie 使用时把此段代码引入页面(function (factory) { if (typeof define === 'function' && define.amd) { define(factory); } else if (typeof expor... 阅读全文
摘要:
var minute = 1000 * 60;var hour = minute *60;var day = hour *24;var week = day * 7;var month = day * 30;function getTimer(stringTime){ var time1 = ... 阅读全文
摘要:
1、一般做法li的排序(call) 78 92 69 54 70 482、利用call方法,让arguments转换成数组li的排序(call) 78 92 69 54 70 48 阅读全文