随笔分类 -  HTML5

When to Use Em vs. Rem
摘要:Both em and rem are flexible, scalable units which are translated by the browser into pixel values, depending on the font size settings in your design 阅读全文

posted @ 2016-01-28 11:05 fishyk 阅读(128) 评论(0) 推荐(0)

Angularjs service vs factory vs provider
摘要:Angular provides us with three ways to create and register our own service.1) Factory2) Service3) ProviderTL;DR1) When you’re using aFactoryyou create... 阅读全文

posted @ 2016-01-20 11:11 fishyk 阅读(242) 评论(0) 推荐(0)

javascript获取class name
摘要:1. document.getElementById("id").className; //字符串2. document.getElementById("id").classList;//数组//Javascript通过标签或者classname获取元素, querySelector()返回第一个元... 阅读全文

posted @ 2015-09-26 23:17 fishyk

动态脚本和样式
摘要:var script = document.createElement(“script”);script.type="text/javascript";script.src="";document.body.appendChild(script);var style = document.creat... 阅读全文

posted @ 2015-09-26 23:06 fishyk

js window object
摘要:---恢复内容开始---1.window对象位置属性: a. IE, Safari, Opera, Chrome提供了screenLeft和screenTop属性, 分别表示窗口相对于屏幕左边和上边的位置. b. Firefox则在screenX和screenY属性中提供相同窗口位置信息,Saf... 阅读全文

posted @ 2015-09-01 16:22 fishyk

js string的一些操作
摘要:1. charAt();如果想获取字符编码,则:charCodeAt();var stringValue ="hello world";alert(stringValue.charAt(4);//"o"2. 字符串操作:concat(),可接受任意参数和“+”类似.3. 字符串操作:slice(),... 阅读全文

posted @ 2015-08-25 16:41 fishyk

Array
摘要:1. Array.isArray(value),只支持,ie9+, firefox4+, chrome.2. Value instanceOf Array, 假定单一的全局执行环境,如果有两个框架,那就存在不同的执行环境,不同的array构造函数不一样。3. toString() , 会返回“1,2... 阅读全文

posted @ 2015-08-20 00:08 fishyk

javascript 基本类型和引用类型
摘要:1. 基本类型源自一下5种基本数据类型:undefined,null,boolean,number, string2. 基本类型和引用类型具有以下特点: 1. 基本类型值在内存中占据固定大小空间,保存在栈中。 2. 从一个变量向另一个变量复制基本类型的值,会创建这个值得一个副本。 3. 引用类... 阅读全文

posted @ 2015-08-18 22:56 fishyk

XMLHttpRequest with progress
摘要: 阅读全文

posted @ 2013-04-01 17:01 fishyk

postMessage
摘要://top page iframe page: 阅读全文

posted @ 2013-04-01 17:00 fishyk

html5 local storage
摘要: 阅读全文

posted @ 2013-04-01 16:10 fishyk

导航