2018年11月23日
摘要: js: var requestURL = 'https://raw.githubusercontent.com/liyifeng0528/sert/master/rrrrttt.json'; var request = new XMLHttpRequest(); request.open('GET' 阅读全文
posted @ 2018-11-23 18:48 李易峰0528 阅读(105) 评论(0) 推荐(0) 编辑
摘要: <!doctype html><html><head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="initial-scale= 阅读全文
posted @ 2018-11-23 12:00 李易峰0528 阅读(75) 评论(0) 推荐(0) 编辑
  2018年11月16日
摘要: 事件流动 DOM事件不单单只会在一个Element上触发,它还会流向其他Element。事件的流动通常会经历这么三个阶段: 捕获阶段 -> 目标阶段 -> 冒泡阶段 "eventPhase" “eventPhase”是“Event”下的一个属性,它指明当前event属于那一个阶段。 “eventPh 阅读全文
posted @ 2018-11-16 11:25 李易峰0528 阅读(115) 评论(0) 推荐(0) 编辑
  2018年11月10日
摘要: console.log()函数: 通过调用该console对象的log()函数,可以在控制台中打印信息。console.log()可以接受任何字符串、数字和JavaScript对象。与alert()函数类似,console.log()也可以接受换行符\n以及制表符\t。console.log()语句 阅读全文
posted @ 2018-11-10 21:03 李易峰0528 阅读(291) 评论(0) 推荐(0) 编辑
摘要: 构造函数(Constructor): 在对象创建或者实例化时候被调用的方法。通常使用该方法来初始化数据成员和所需资源。构造器Constructor在js不能被继承,因此不能重写Overriding,但可以被重载Overloading,构造函数在C++中如果写成public属性那么可以继承,构造函数, 阅读全文
posted @ 2018-11-10 20:49 李易峰0528 阅读(111) 评论(0) 推荐(0) 编辑
摘要: for each循环: forEach循环有一个缺点:你不能中断循环(使比如说用break语句或使用return语句) 用法:var arr = [44,9,11,22,33,55,66]; arr.forEach(function(ele,index){ console.log("forEach用 阅读全文
posted @ 2018-11-10 20:27 李易峰0528 阅读(144) 评论(0) 推荐(0) 编辑
  2018年11月3日
摘要: atan2函数:计算给定横坐标和纵坐标点的反正切值。函数返回的结果是-π~π之间的弧度值。 atan2(y,x):过原点和指定坐标点(y,x)的直线与x轴之间的夹角 pow(x,y):计算x的y次幂 阅读全文
posted @ 2018-11-03 21:54 李易峰0528 阅读(124) 评论(0) 推荐(0) 编辑
摘要: 最早的能执行特定计算的机器普遍被认为是19世纪中期由Babbage发明的,并由Ada为之编写了若干数学计算的程序,Ada(诗人拜伦之女),可以说是第一个程序员; 20世纪开始的几十年,程序主要以穿孔卡片的方式编制。 1940s,产生了真正意义上的电子计算机, 主要被军事目的所驱动,如加解密、弹道计算 阅读全文
posted @ 2018-11-03 21:48 李易峰0528 阅读(101) 评论(0) 推荐(0) 编辑
摘要: string msg = "liyifeng"; //判断这个字符串中出现i的次数,和每次出现的索引位置 int count = 0; string keywords = "i"; int index = 0; while ((index = msg.IndexOf(keywords, index) 阅读全文
posted @ 2018-11-03 21:27 李易峰0528 阅读(134) 评论(0) 推荐(0) 编辑
摘要: name: /^([a-zA-Z0-9\u4e00-\u9fa5\·]{1,10})$/(如:名字为张三) phone: /^(0\d{2,3}[-| ]?)?(\d{7,8})([-| ]?\d{3,5})?$/(如:电话号码为010-85369999) email: ([a-zA-Z0-9_\. 阅读全文
posted @ 2018-11-03 21:14 李易峰0528 阅读(132) 评论(0) 推荐(0) 编辑