Angularjs给动态生成的元素绑定事件
摘要://获取动态生成的元素 getJqforAnguar:function(jqid){ angular.element(document).injector().invoke(function($compile){// 编译html var $jqid = jqid; ...
阅读全文
posted @
2018-07-25 10:48
chenlw101
阅读(268)
推荐(0)
文字超出隐藏
摘要:(1).文字超出一行,省略超出部分,显示’…’ 如果这种情况比较多,可以取一个切合作用的类名用于复用。 (2). 可以给定容器宽度限制,超出部分省略 3、html文字超过两行或三行就显示省略号 转载自https://blog.csdn.net/liwenfei123/article/details/
阅读全文
posted @
2018-07-18 09:25
chenlw101
阅读(130)
推荐(0)
SOCKET.IO
摘要:原文:http://www.cnblogs.com/xiezhengcai/p/3956401.html 1. 服务端 io.on('connection',function(socket)); 监听客户端连接,回调函数会传递本次连接的socket io.sockets.emit('String',
阅读全文
posted @
2018-07-09 17:06
chenlw101
阅读(169)
推荐(0)
call与apply简单介绍
摘要:var pet={ word:'...', speak:function(say){ console.log(say+' '+this.word) } } //pet.speak('speak')//speak ... var dog={ word:'wang' } //改变this到dog上 pet.speak.call(dog,'speak')...
阅读全文
posted @
2018-07-04 17:18
chenlw101
阅读(135)
推荐(0)
html里面,没有内容,要高度占满页面
摘要:百分比是根据父元素的,所以要将html也100%
阅读全文
posted @
2018-07-03 17:00
chenlw101
阅读(530)
推荐(0)
css实现三角形标
摘要:实现右上角三角,父元素需要加上overflow:hidden;
阅读全文
posted @
2018-07-03 16:58
chenlw101
阅读(336)
推荐(0)
倒计时代码
摘要:zbtime:"2018/07/04 14:30:00", //直播时间毫秒数 zbTimeHm:function(){ var time=this.zbtime; var HaoMiao = (new Date(time)).getTime(); //得...
阅读全文
posted @
2018-07-03 16:56
chenlw101
阅读(279)
推荐(0)