随笔分类 -  Web Front-end

开始前端开发,要注意方法了,所以我打算在这里写一下博客
摘要:function alertFunc(str1,str2,str3){ alert(str1); alert(str2); alert(str3); } function callAlert(functionName){ var func=eval(functionName); new func(argumen... 阅读全文
posted @ 2016-08-07 07:44 calochCN 阅读(508) 评论(0) 推荐(0)
摘要:1.获取所有eventhandler 使用 getEventHandler(target) 2.target.addEventHandler(type,handler,userCapture?) 3.target.removeEventHandler(type,handler,userCapture 阅读全文
posted @ 2016-08-06 14:49 calochCN 阅读(1455) 评论(0) 推荐(0)
摘要:原 荐 gulp构建前端工程 半张一块 半张一块 发布时间: 2016/07/27 16:22 阅读: 895 收藏: 4 点赞: 4 评论: 2 发布时间: 2016/07/27 16:22 阅读: 895 收藏: 4 点赞: 4 评论: 2 <!-- 摘要 --> 摘要 Gulp 是一个自动化工 阅读全文
posted @ 2016-07-29 11:21 calochCN 阅读(409) 评论(0) 推荐(0)
摘要:my error handling clause:window.onerror = function (errorMessage, scriptURI, lineNumber, columnNumber, errorObj) { console.log("error message:", errorMessage); console.log("error file:", scr... 阅读全文
posted @ 2016-06-20 14:00 calochCN 阅读(179) 评论(0) 推荐(0)
摘要:escape() 方法: 采用ISO Latin字符集对指定的字符串进行编码。所有的空格符、标点符号、特殊字符以及其他非ASCII字符都将被转化成%xx格式的字符编码(xx等于该字符在字符集表里面的编码的16进制数字)。比如,空格符对应的编码是%20。 不会被此方法编码的字符: @ * / + encodeURI() 方法: 把URI字符串采用UTF-8编码格式转化成escape格式的字... 阅读全文
posted @ 2016-05-24 09:36 calochCN 阅读(161) 评论(0) 推荐(0)
摘要:http://www.chinaz.com/design/2015/1109/467968_2.shtml The golden ratio: 1.618 a/b=b/(a+b) The Fibonacci series: The perfect arc: The round circles 阅读全文
posted @ 2016-05-16 10:55 calochCN 阅读(147) 评论(0) 推荐(0)
摘要:之前一直需要一个拖拽效果,网上找了些感觉不是不好用,就是写的有些地方让人不太满意,下面贡献一个自己写的。亲测可用,拖动后可互换位置!(带有注释) 方法/步骤 CSS代码部分 JS代码部分 上面的是网页 head区域, 下面的是 body区域 阅读全文
posted @ 2016-05-12 12:57 calochCN 阅读(2367) 评论(1) 推荐(1)
摘要:CSS position:static:默认属性,静态定位relative:相对定位,相对于父元素的定位,需要配合top,left,right,bottom,z-index等属性absolute:绝对定位,相对于父元素的定位,需要配合top,left,right,bottom,z-index等属性f 阅读全文
posted @ 2016-05-04 21:22 calochCN 阅读(143) 评论(0) 推荐(0)
摘要:[‎5/‎3/‎2016 4:18 PM] Calos Chen: function a(b,e){var a=0;a+=b;if(e){console.log(b+e);return;} return function(c){a+=c;console.log(a)}} output: a(2,3) 5 a(2,3) 5两种写法结果一样 a(2,3)和a(2)(3) 阅读全文
posted @ 2016-05-03 16:32 calochCN 阅读(176) 评论(0) 推荐(0)
摘要:布局:两个div,上部内容将表头复制,高度固定,下部div内部将table设置为margin:-**px; 隐藏掉表头,下部div设置overflow,即可。 代码: 阅读全文
posted @ 2016-04-08 16:37 calochCN 阅读(226) 评论(0) 推荐(0)
摘要:/* Author: Calos Description: patv2 pager !import: this pager goes with the time, we just temporarily stay, what a sad fact! */ (function ($) { $.fn.patpager = function (options) { opti... 阅读全文
posted @ 2016-04-06 15:32 calochCN 阅读(500) 评论(0) 推荐(0)
摘要:接口是基于实例方法的,如果未实现,静态方法就会抛出错误。 阅读全文
posted @ 2016-03-31 13:10 calochCN 阅读(404) 评论(1) 推荐(0)
摘要:jQuery插件开发入门 发表于 2014年05月23日 by 天涯孤雁 被浏览 20,897 次 2014-5-27 更新 Require.js中使用jQuery 插件请查看http://www.css88.com/archives/4826 感谢,huugle的留言; 扩展jQuery插件和方法 阅读全文
posted @ 2016-03-29 10:44 calochCN 阅读(307) 评论(0) 推荐(0)
摘要:$(document).on("click","#a",function(){alert(1)}) [#document] as a replacement of previous delegate etc.. event capture netscape 和 微软 曾经的战争还是比较火热的,当时, 阅读全文
posted @ 2016-03-28 13:48 calochCN 阅读(6884) 评论(0) 推荐(0)
摘要:http://www.daqianduan.com/example?pid=2959 animation, transition, transform or ani 2 trans 阅读全文
posted @ 2016-03-11 18:01 calochCN 阅读(159) 评论(0) 推荐(0)
摘要:http://plugins.jquery.com/?s=bootstrap 1. /reg/.test(strval) 2."strval".match(/reg/g), a reverse style of reg.exec, but when whether with g, exec resu 阅读全文
posted @ 2016-03-03 10:27 calochCN 阅读(395) 评论(0) 推荐(0)
摘要:以前用flash做首页图片轮播。最近的网站里用到一个插件MyFocus插件焦点图插件用法如下: ">"thumb=""alt=""/> 使用起来很方便,使用上完全用ullist可以呈现,很方便。 阅读全文
posted @ 2015-05-21 16:21 calochCN 阅读(333) 评论(0) 推荐(0)
摘要:把名称和后台来的json数据约定起来,可以达到的效果就是可以将东西统一化,减少差异,提升模块等的通用性,此后就可以实现具体不同模块内容可以自动或拷贝赋值的方式 2016.7.18 refactor string formatter code: another realization, more sl 阅读全文
posted @ 2014-12-29 14:43 calochCN 阅读(487) 评论(0) 推荐(0)
摘要:以前都是做.net,今年换工作,进到公司,突然转到前端,因为从前做过一些页面的,但是都没有复杂的效果。工作内容来了前端的内容,但是也不能落后,一定要做出来,按一定的时间。碰到内容,对面服务器返回json内容,在jquery ajax中严格限定了,只能用Json,结果返回时的json,在工具中查看是正... 阅读全文
posted @ 2014-12-25 15:03 calochCN 阅读(131) 评论(0) 推荐(0)