摘要: 向HTML中插入视频有两种方法,一种是古老的object标签,一种是html5中的video标签,前者兼容性相对好些,后者兼容性让人头疼。最常用的向HTML中插入视频的方法有两种,一种是古老的<object></object>标签,一种是html5中的<video></video>标签。 前者的兼容 阅读全文
posted @ 2017-12-18 14:50 dontes 阅读(6184) 评论(0) 推荐(0) 编辑
摘要: 第一种 v-bind:class="{ active: item.isActive } v-on:click="doSomething"active是样式名,内容是红色背景.item.isActive在data中,为布尔值。doSomething在methods中,对item.isActive取反. 阅读全文
posted @ 2017-12-02 15:44 dontes 阅读(18817) 评论(0) 推荐(0) 编辑
摘要: https://www.cnblogs.com/nield-bky/p/6040853.html http://blog.csdn.net/csdn565973850/article/details/73838583 时间转时间戳: 时间戳转时间: 阅读全文
posted @ 2017-11-29 23:28 dontes 阅读(879) 评论(0) 推荐(0) 编辑
摘要: H5的video标签不能直接在vue里使用,需要安装其他插件,vue-video-player。 官网如下: https://www.npmjs.com/package/vue-video-player 简介: https://segmentfault.com/a/1190000007474673 阅读全文
posted @ 2017-11-25 22:05 dontes 阅读(13696) 评论(0) 推荐(0) 编辑
摘要: 问题距离 window.onload = function(){ var box = document.getElementById("box"); var num = 0; for(var i=0;i<10;i++){ box.onclick = function(){ console.log(i 阅读全文
posted @ 2017-11-25 11:58 dontes 阅读(271) 评论(0) 推荐(0) 编辑
摘要: window.onload = function(){ var box = document.getElementById("box"); var num = 0; for(var i=0;i<10;i++){ box.onclick = function(){ console.log(i); // 阅读全文
posted @ 2017-11-25 11:57 dontes 阅读(182) 评论(0) 推荐(0) 编辑
摘要: $(".navigation").children().eq(0).click(function() { $("html, body").animate({scrollTop: $(".footer").offset().top }, {duration: 500,easing: "swing"}) 阅读全文
posted @ 2017-11-25 10:32 dontes 阅读(526) 评论(0) 推荐(0) 编辑
摘要: 第一种方法function abs(x) { if (x >= 0) { return x; } else { return -x; } }第二种方法 var abs = function (x) { if (x >= 0) { return x; } else { return -x; } }; 阅读全文
posted @ 2017-10-24 18:46 dontes 阅读(223) 评论(0) 推荐(0) 编辑
摘要: __proto__(隐式原型)与prototype(显式原型) 每一个函数在创建之后都会拥有一个名为prototype的属性,这个属性指向函数的原型对象。 对象有隐性的_proto_,function有_proto_,还有prototype。 初学javascript的时候也跟题主一样搞不清楚,自己 阅读全文
posted @ 2017-10-24 15:15 dontes 阅读(137) 评论(0) 推荐(0) 编辑
摘要: 1、创建数组 1.1 var arr = new Array(); (指定数组长度var arrayObj = new Array([size]); ) 1.2 var arr=[]; 2、数组添加 arrayObj. push([item1 [item2 [. . . [itemN ]]]]);/ 阅读全文
posted @ 2017-10-24 12:04 dontes 阅读(640) 评论(0) 推荐(0) 编辑