随笔分类 - js
摘要:function getExplorer() { var explorer = window.navigator.userAgent; //ie if (explorer.indexOf("MSIE") >= 0) { return 'ie'; } ...
阅读全文
摘要:转自:CTOLib , www.ctolib.com/topics-107352.html ggraph - 图形可视化的凌乱数据 转自:CTOLib , www.ctolib.com/topics-107352.html ggraph - 图形可视化的凌乱数据 转自:CTOLib , www.ct
阅读全文
摘要:/* 获取当前环境: 系统环境: iOS Android PC 浏览器环境 微信内置浏览器、QQ内置浏览器、正常浏览器 是否app内打开 */ var ua = navigator.userAgent.toLowerCase(); //获取浏览器标识并转换为小写 var curConfig = { isiOS: !!navigator.userAgent....
阅读全文
摘要:function hrefObj() { var localhref = window.location.href; var localarr = localhref.split('?')[1].split('&'); console.log(localarr) var tempObj = {};
阅读全文
摘要:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.or
阅读全文
摘要:var day1 = new Date("2017-9-17"); var day2 = new Date("2017-10-18"); console.log((day2 - day1) / (1000 * 60 * 60 * 24));
阅读全文
摘要:function tab(date1,date2){ var oDate1 = new Date(date1); var oDate2 = new Date(date2); if(oDate1.getTime() > oDate2.getTime()){ console.log('第一个大'); } else { console.l...
阅读全文
摘要:getBeforeDate: function(day, str) { var now = new Date().getTime(); //获取毫秒数 var before = new Date(now - ((day > 0 && day ? day : 0) * 86400 * 1000)); var year = before.getFullYear(); var month = befo...
阅读全文
摘要:Document t1 点击获取ip click me
阅读全文
摘要:https://www.mobiscroll.com/ https://github.com/xfhxbb/LCalendar 温馨提示:强烈建议使用:https://github.com/zhoushengmufc/iosselect 不建议使用 demo下载链接:http://download.
阅读全文
摘要:仿微信抢红包 javascript实现仿微信抢红包 红包个数:个 总 金 额:元 发红包 参考《微信红包的架构设计简介》文章 ...
阅读全文
摘要://默认登记时间为今天 var date = new Date; var year = date.getFullYear(); var month = date.getMonth() + 1; month = month < 10 ? "0" + month : month; var day = d
阅读全文
摘要:注: origin为远程仓库名称 master为远程分支名称 //第一次提交所有代码 1.git clone 项目url 2.复制.git 和文件到根目录 3.git add . 4.git commit -m "XXXX(提交说明)" 5.git push -u origin master:xxx
阅读全文
摘要:(function() { 'use strict' angular.module('myApp') .controller('catesDetailCtr', ['$scope', '$state', '$rootScope', 'MyServer', 'ipCookie', function($
阅读全文
摘要:// 对象转数组并倒序 // function objToArray(array) { // var arr = []; // for (var a in array) { // var item = { // key: a, // value: array[a] // } // arr.push(
阅读全文
摘要:{{(value.time+'000' | date:'yyyy-MM-dd HH:mm:ss') : '/'}} .filter('getWeek', function() { return function(input) { var date = new Date(input * 1000); var week = date.getDay(); switch (week) { case 0...
阅读全文
摘要:$rootScope.getTokenOther = function(formdata) { // console.log("getTokenOther formdata", formdata); MyServer.otherlogin(formdata, function(data) { con
阅读全文