摘要: let arr = [] 1. instanceof arr isntanceof Array 2. __proto__ arr.__proto__ Array.prototype Array.prototype.isPrototypeOf(arr) Array.prototype Object.g 阅读全文
posted @ 2020-03-10 20:47 bya 阅读(1709) 评论(1) 推荐(0) 编辑
摘要: 1.使用百分比 2.使用em,相对于上下文的百分比(body默认16px, 100%, 1em) body{ font-size: 16px; font-size: 100%; font-size: 1em; } 子元素相对body的大小。比如宽度为48px, 则设置 width: 3em 3.媒体 阅读全文
posted @ 2020-03-10 20:27 bya 阅读(173) 评论(0) 推荐(0) 编辑
摘要: 插件: 1.video.js videojs-flash.js 可以播放rtmp直播流 2. hls.js 在html页面上可以播放m3u8格式的视频,但在react node项目上不行。 3.尝试用videojs-contrib-hls和@videojs/http-streaming失败。 4.尝 阅读全文
posted @ 2019-07-13 02:25 bya 阅读(4765) 评论(0) 推荐(0) 编辑
摘要: 1.ES6是JavaScript规范,之所以不叫JavaScript,一是因为商标问题,java是SUN公司的商标,只有Netscape才能使用JavaScript这个名字,且JavaScript已经被Netscape公司注册为商标。二是想体现这门语言的制定者是ECMA,而不是Netscape. 2 阅读全文
posted @ 2019-05-15 19:05 bya 阅读(146) 评论(0) 推荐(0) 编辑
摘要: JavaScript 在父窗口中获取iframe中的元素 1 2 3 4 5 6 7 8 9 10 11 格式:window.frames["iframe的name值"].document.getElementById("iframe中控件的ID").click(); 实例:window.frame 阅读全文
posted @ 2019-04-12 17:47 bya 阅读(36697) 评论(0) 推荐(3) 编辑
摘要: 第一种情况:iframe中不存在name和id的方法:(通过contentWindow获取) var iframe = document.getElementsByTagName('iframe')[0];var ifr_document = iframe.contentWindow.documen 阅读全文
posted @ 2019-04-12 17:45 bya 阅读(1328) 评论(0) 推荐(0) 编辑
摘要: 基本的认识: 文本选中区域光标:页面中闪烁的光标其实就是特殊的宽度为0的选区。 简单理解就是选区的左右边界交叉形成了光标。 有了这个概念下面的内容就很好理解了。 非IE浏览器下的实现 这里需要用到input元素的两个属性。 selectionStart、selectionEnd 选区开始位置,选区结 阅读全文
posted @ 2019-04-08 14:14 bya 阅读(11217) 评论(0) 推荐(1) 编辑
摘要: var mapContainer = document.querySelector('#container') mapContainer.addEventListener("DOMNodeInserted",function(e){ var smnoprint = document.querySel 阅读全文
posted @ 2019-01-19 18:35 bya 阅读(1112) 评论(0) 推荐(0) 编辑
摘要: npm --add-python-to-path='true' --debug install --global windows-build-tools npm install --global node-gyp 阅读全文
posted @ 2019-01-07 17:59 bya 阅读(912) 评论(0) 推荐(0) 编辑
摘要: npm 是一个包管理器,它让 JavaScript 开发者分享、复用代码更方便(有点 maven 的感觉哈)。 在程序开发中我们常常需要依赖别人提供的框架,写 JS 也不例外。这些可以重复的框架代码被称作包(package)或者模块(module),一个包可以是一个文件夹里放着几个文件,同时有一个叫 阅读全文
posted @ 2019-01-07 16:33 bya 阅读(352) 评论(0) 推荐(0) 编辑