![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
js
炎炎夏日_123
这个作者很懒,什么都没留下…
展开
-
js 如何去除字符两端的引号
通过js 提供的substring()就可以直接去除引号。(注意是小写,和java不同) var imgPath = JSON.stringify(api.pageParam.imgPath); alert("1"+imgPath); alert("2"+imgPath.length); console.log(imgPath);原创 2016-09-21 14:28:47 · 39264 阅读 · 0 评论 -
js 数组迭代方法,归并方法
1.js 提供了一些迭代的方法,包括every,some,filter,map,forEach.every():对数组中的每一项运行给定函数,如果该函数对每一项都返回true,则返回true。 filter():对数组中的每一项运行给定函数,返回该函数会返回true 的项组成的数组。 forEach():对数组中的每一项运行给定函数。这个方法没有返回值。 map():对数组中的每一项运行原创 2016-10-21 16:44:22 · 3488 阅读 · 0 评论 -
js中的事件机制
1.事件绑定的集中方式: 1.1通过在html标签中加入onclick,onblur等。 <div id="outestA" onclick="var id = this.id;alert(id);return false;"></div> 但是这种不做不值得提倡。 1.2在onclick中指定函数名:<script> function buttonH转载 2016-08-09 11:12:37 · 1302 阅读 · 0 评论 -
Node.js 解压版 安装配置
本文系转载:原文链接为:https://my.oschina.net/zhzx/blog/1014764 1.下载 https://nodejs.org/zh-cn/download/ 选择对应的版本: 进入下载好的压缩包目录,解压到某一文件夹下面,并新建两个目录node-global和node-cache。 node-global :npm全局安装位置 node-cache:n转载 2018-01-10 13:30:58 · 6460 阅读 · 0 评论