摘要: html代码 BootStrap Tab Component This is the content of the first tab. This is the content of the second tab. JavaScript代码 angular.module('component... 阅读全文
posted @ 2016-07-04 10:52 潇潇杀 阅读(289) 评论(0) 推荐(0) 编辑
摘要: var app = angular.module('myApp',[]); app.controller('MyContro',function($scope){ $scope.name = "join"; }); app.filter('firstCapitals',function(){ ret 阅读全文
posted @ 2016-06-23 17:30 潇潇杀 阅读(479) 评论(0) 推荐(0) 编辑
摘要: 首先看看官方关于$parse的api $parse 作用:将一个AngularJS表达式转换成一个函数 Usage $parse(expression) arguments expression:需要被编译的AngularJS语句 returnsfunc(context, locals) context[object]:针对你要解析的语句,这个对象中含有你要解析的语句中的表达式(通常是一... 阅读全文
posted @ 2016-06-21 10:44 潇潇杀 阅读(189) 评论(0) 推荐(0) 编辑
摘要: q用了10版本的,一直发现attr无效,其实解决问题的方法是很简单的,主要的问题是由于 新版本attr换成了prop的问题。 $("input[name='delIds']").prop("checked",this.checked); 阅读全文
posted @ 2016-03-02 14:31 潇潇杀 阅读(576) 评论(0) 推荐(0) 编辑
摘要: JS function sendInfoToNativeByIframe:function(src){ var iframe = document.createElement('iframe'); iframe.style.display = 'none'; iframe.src=src; docu 阅读全文
posted @ 2016-02-19 15:45 潇潇杀 阅读(391) 评论(0) 推荐(0) 编辑
摘要: 大家应该都知道用text-overflow:ellipsis属性来实现单行文本的溢出显示省略号(…)。当然部分浏览器还需要加宽度width属性。以下是常规写法overflow: hidden;text-overflow: ellipsis;white-space: nowrap;但是这个属性并不支持... 阅读全文
posted @ 2015-04-15 09:42 潇潇杀 阅读(160) 评论(0) 推荐(0) 编辑
摘要: html部分 第一张图片 第二张图片 ... 阅读全文
posted @ 2014-12-31 15:38 潇潇杀 阅读(477) 评论(0) 推荐(0) 编辑
摘要: /** * 使用offsetLeft,需注意margin的使用 * offsetLeft = margin-left + left; * offsetWidth= padding + border + width; * * @author Lonve */function getStyle(ele... 阅读全文
posted @ 2014-11-24 16:02 潇潇杀 阅读(193) 评论(0) 推荐(0) 编辑
摘要: function trim(str){ var string=''; var a = 0; var b = 0; var arr = []; for(var i=0;i=0;i--){ if(str.charCodeAt(i) == 32||str.charCodeAt(i)==12... 阅读全文
posted @ 2014-11-21 15:50 潇潇杀 阅读(268) 评论(0) 推荐(0) 编辑
摘要: function trimAll(str){ var string=''; var arr = []; for(var i=0;i<str.length;i++){ if(str.charCodeAt(i) == 32||str.charCodeAt(i) == 12288){ ... 阅读全文
posted @ 2014-11-21 13:45 潇潇杀 阅读(979) 评论(0) 推荐(1) 编辑