![](https://img-blog.csdnimg.cn/20201014180756926.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
javascript
文章平均质量分 74
chuichui123456
这个作者很懒,什么都没留下…
展开
-
pcm转wav,解决浏览器无法直接播放pcm格式的音频数据
1. 创建PCM2WAV类const stream = require('stream')const waveheader = require('waveheader')class PCM2WAV { constructor (options) { let pcm2wav = new stream.Transform() options = options || {...原创 2019-11-19 14:00:24 · 1167 阅读 · 3 评论 -
javascript 对象继承
继承的定义:创建一个或多个类的专门版本类的方式称为继承。javascript只支持单继承,创建的专门版本的类通常叫做子类,另外的类称为父类。在现代浏览器中你可以使用Object.create实现继承。举个例子,定义一个父类Person类,然后定义Student类作为Person类的子类,之后重新定义sayHello()方法并添加了sayGoodbye()方法。//定义Perso原创 2018-01-30 22:01:30 · 230 阅读 · 0 评论 -
Javascript面向对象编程(OOP)
1.属性、方法和原型对象 function People(name, sex, deposit) { this.name = name; this.sex = sex; var deposit = deposit; //私有属性deposit(存款) this.consume = functio...原创 2018-02-12 12:12:16 · 192 阅读 · 0 评论 -
js毫秒转换成年月日
/*js由毫秒数得到年月日使用: (new Date(parseInt(data)*1000)).Format("yyyy-MM-dd hh:mm:ss.S")*/Date.prototype.Format = function (fmt) { var o = { "M+": this.getMonth() + 1, //月份 "d+": this.getDate(),...原创 2018-04-03 14:48:40 · 2412 阅读 · 0 评论