(function() { 'use strict' angular.module('myApp') .controller('catesDetailCtr', ['$scope', '$state', '$rootScope', 'MyServer', 'ipCookie', function($
1.npm install -g express-generator 2.进入服务目录(自己定义的文件夹,或者express Myapp && cd Myapp 新建Myapp文件夹并进入) 3.npm install 4.express -e 5.Y 继续 6.npm install instal
1.结构赋值 { let a,b,c; [a,b] = [1,2]; console.log(a,b); //1,2} { let a,b,rest; [a,b,...rest] = [1,2,3,4,5,6]; console.log(a,b,rest); //3,[4,5,6]} 2.对象结构赋
一、let 和const 1.let 只在自己声明的块作用域中有效; function test(){ let a = 'a'; var b = 'b'; for(let i =1;i<3;i++){ co
function tab(date1,date2){ var oDate1 = new Date(date1); var oDate2 = new Date(date2); if(oDate1.getTime() > oDate2.getTime()){ console.log('第一个大'); } else { console.l...
{ //es5中 let regex = new RegExp('xyz', 'i'); let regex2 = new RegExp(/xyz/i); console.log(regex.test('xyz123'), regex2.test('xyz123')); // true,true /
https://.mobiscroll.com/ https://github.com/xfhxbb/LCalendar 温馨提示:强烈建议使用:https://github.com/zhoushengmufc/iosselect 不建议使用
//默认登记时间为今天 var date = new Date; var year = date.getFullYear(); var month = date.getMonth() + 1; month = month < 10 ? "0" + month : month; var day = d
{ console.log('a',`\u0061`); //a,a console.log('s',`\u20BB7`); //s ₻7 console.log('s',`\u{20BB7}`) //s ???? }//charCodeAt 和 codePointAt{ let s = 'a'; le
{ let arr = Array.of(3, 4, 7, 9, 11); console.log('arr', arr); //[3,4,7,9,11] let empty = Array.of(); console.log(empty); //[] } //ES6为Array增加了from函数用来将其他对象转换成数组。 //当然,其他对象也是有要求,也不是所...
倒计时 还剩
{ //二进制数值都是0b开头,八进制0o console.log(0b111110111) //503 console.log(0o767); //503 } { console.log('15',Number.isFinite(15)); //true console.log('NaN',Number.isFinite(NaN)); //false N...
Document 获取验证码
{ //简洁表示法 let o = 1; let k = 2; let es5 = { o:o, k:k }; let es6 = { o,k }; console.log(es5,es6); //1,2;1,2 let es5_method = { hell...
Document t1 点击获取ip click me
//函数参数默认值(more值后不能有参数) { function test(x,y = 'world'){ console.log('默认值',x,y); } test('hello');// hello world test('hello','kill'); //hello kill } //作用域概念 { let x = 'te...
{ // 声明 let a1 = Symbol(); let a2 = Symbol(); console.log(a1 === a2); //false let a3 = Symbol.for('a3'); let a4 = Symbol.for('a3'); co
getBeforeDate: function(day, str) { var now = new Date().getTime(); //获取毫秒数 var before = new Date(now - ((day > 0 && day ? day : 0
function hrefObj() { var localhref = window.location.href; var localarr = localhref.split('?')[1].split('&'); console.log(localarr) var tempObj = {};
var day1 = new Date("2017-9-17"); var day2 = new Date("2017-10-18"); console.log((day2 - day1) / (1000 * 60 * 60 * 24));
{ let list = new Set(); list.add(5); list.add(7); console.log('size', list, list.size); //{5, 7} 2 } { let arr = [1, 2, 3, 4, 5]; let list = new Set(arr); console.log('...
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "://.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="://.w3.or
//数据结构对比 增查改删 { //map和array对比 let map = new Map(); let array = []; //增 map.set('t',1); array.push({t:1}); console.info('map-array',map,array) //{"t"=>1};-[0:{t:1}] ...
1 用户名正则 //用户名正则,4到16位(字母,数字,下划线,减号) var uPattern = /^[a-zA-Z0-9_-]{4,16}$/; //输
//数据结构对比 增查改删 { //map、set和Object let item = {t:1}; let map = new Map(); let set = new Set(); let obj = {}; //增 map.set('t',1); set.add(item); obj['t'] = 1; co...
function testNumber(){ var yourinputValue=$("#yourinputId").val(); var reg = /^[1-9]\d*$/; alert(reg.test(yourinputValue)) }
{ // 基本定义和生成实例 class Parent{ constructor(name='mukewang'){ this.name=name; } } let v_parent1=new Parent(); let v_parent2=new Parent('v'); console.log('构造函数和实例',v_parent1,v_p...
{ //原始对象 let obj={ time:'2017-03-11', name:'net', _r:123 }; //(代理商)第一个参数代理对象,第二个参数真正代理的东西 let monitor=new Proxy(obj,{ // 拦截对象属性的读取 get(target,key){ return target...
{ // 基本定义 let ajax = function(callback) { console.log('执行'); //先输出 1 执行 setTimeout(function() { callback && callback.call() }, 1000); }; ajax(funct...
Iterator遍历器 遍历器(Iterator)就是这样一种机制。它是一种接口,为各种不同的数据结构提供统一的访问机制。任何数据结构只要部署Iterator接口,就可以完成遍历操作(即依次处理该数据结构的所有成员)。 作用: 为各种数据结构,提供一个统一的、简便的访问接口 使得数据结构的成员能够按
Copyright © 2005-2025 51CTO.COM 版权所有 京ICP证060544号