会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
晴天宝宝
博客园
首页
新随笔
联系
管理
订阅
上一页
1
2
3
4
5
6
7
8
9
···
16
下一页
2019年11月9日
正则表达式
摘要: 1、什么是正则表达式? 正则表达式(Regular Expression)是用于匹配字符串中字符组合的模式。在JavaScript中,正则表达式也是对象。 正则表通常用于:1.检索,替换那些符合某个模式(规则)的文本,2.过滤掉页面内容中的而一些敏感词(替换),3.从字符串中获取我们想要的特定部分(
阅读全文
posted @ 2019-11-09 14:05 晴天宝宝i
阅读(191)
评论(0)
推荐(0)
2019年11月8日
思考题(闭包)
摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta http-e
阅读全文
posted @ 2019-11-08 22:11 晴天宝宝i
阅读(165)
评论(0)
推荐(0)
案例:闭包应用-打车价格
摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv
阅读全文
posted @ 2019-11-08 21:59 晴天宝宝i
阅读(221)
评论(0)
推荐(0)
函数高阶(函数,改变函数this指向,高阶函数,闭包,递归)
摘要: 一、函数的定义方式 1.函数声明方式 function 关键字(命名函数) 2.函数表达式(匿名函数) 3.new Function( ) var fn = new Function(‘参数1’,‘参数2’.....,‘函数体’) Function 里面参数都必须是字符串格式 第三种方式执行效率低,
阅读全文
posted @ 2019-11-08 14:54 晴天宝宝i
阅读(524)
评论(0)
推荐(0)
案例:新增数组方法
摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta http-e
阅读全文
posted @ 2019-11-08 12:05 晴天宝宝i
阅读(185)
评论(0)
推荐(0)
案例:商品查询
摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv
阅读全文
posted @ 2019-11-08 12:01 晴天宝宝i
阅读(272)
评论(0)
推荐(0)
案例:forEach和some区别
摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta http-e
阅读全文
posted @ 2019-11-08 11:58 晴天宝宝i
阅读(1393)
评论(0)
推荐(0)
ES5新增方法(数组,字符串,对象)
摘要: 一、数组方法 迭代(遍历)方法:forEach()、map()、filter()、some()、every(); 1. array. forEach(function(value,index,arr){}) value:数组当前项的值 index:数组当前项的索引 arr:数组对象本身 2. arr
阅读全文
posted @ 2019-11-08 11:57 晴天宝宝i
阅读(298)
评论(0)
推荐(0)
案例:借用父构造函数继承属性和方法
摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv
阅读全文
posted @ 2019-11-08 10:16 晴天宝宝i
阅读(166)
评论(0)
推荐(0)
2019年11月7日
构造函数 和 原型
摘要: 1、概述 在典型的 OOP 的语言中(如Java),都存在类的概念,类就是对象的模板,对象就是类的实例,但是在ES6之前,JS中并没有引入类的概念。 ES6,全称 ECMAScript6.0,2015.06发版。但是目前浏览器的 JavaScript 是ES5 版本,大多数高版本的浏览器也支持 ES
阅读全文
posted @ 2019-11-07 21:37 晴天宝宝i
阅读(153)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
7
8
9
···
16
下一页
公告