会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
dontes
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
6
7
下一页
2017年12月18日
向HTML中插入视频有两种方法
摘要: 向HTML中插入视频有两种方法,一种是古老的object标签,一种是html5中的video标签,前者兼容性相对好些,后者兼容性让人头疼。最常用的向HTML中插入视频的方法有两种,一种是古老的<object></object>标签,一种是html5中的<video></video>标签。 前者的兼容
阅读全文
posted @ 2017-12-18 14:50 dontes
阅读(6268)
评论(0)
推荐(0)
2017年12月2日
vue中改变背景图,实现点击切换效果
摘要: 第一种 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
阅读(18886)
评论(0)
推荐(0)
2017年11月29日
JS时间戳和时间互转
摘要: https://www.cnblogs.com/nield-bky/p/6040853.html http://blog.csdn.net/csdn565973850/article/details/73838583 时间转时间戳: 时间戳转时间:
阅读全文
posted @ 2017-11-29 23:28 dontes
阅读(891)
评论(0)
推荐(0)
2017年11月25日
vue-video-player
摘要: 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
阅读(13740)
评论(0)
推荐(0)
fon循环总是返回最后值问题
摘要: 问题距离 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
阅读(279)
评论(0)
推荐(0)
js
摘要: 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
阅读(189)
评论(0)
推荐(0)
js页面滚动定位
摘要: $(".navigation").children().eq(0).click(function() { $("html, body").animate({scrollTop: $(".footer").offset().top }, {duration: 500,easing: "swing"})
阅读全文
posted @ 2017-11-25 10:32 dontes
阅读(528)
评论(0)
推荐(0)
2017年10月24日
函数定义
摘要: 第一种方法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
阅读(228)
评论(0)
推荐(0)
__proto__和prototype
摘要: __proto__(隐式原型)与prototype(显式原型) 每一个函数在创建之后都会拥有一个名为prototype的属性,这个属性指向函数的原型对象。 对象有隐性的_proto_,function有_proto_,还有prototype。 初学javascript的时候也跟题主一样搞不清楚,自己
阅读全文
posted @ 2017-10-24 15:15 dontes
阅读(145)
评论(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
阅读(653)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
7
下一页
公告