2013年7月4日
摘要:
HTML5 input元素type=range
阅读全文
posted @ 2013-07-04 12:41
雨弓
阅读(3352)
推荐(0)
2013年7月3日
摘要:
proxy_pass http://backend;proxy_http_version 1.1;proxy_set_header Upgrade $http_upgrade;proxy_set_header Connection $connection_upgrade;据说1.3以后就支持了 不需要编译那个tcp 模块了firebug会看到状态是101 Switching Protocols
阅读全文
posted @ 2013-07-03 16:51
雨弓
阅读(1986)
推荐(0)
2013年6月6日
摘要:
跑马灯的代码很多了 ,这次用节点操作的方式实现一个 , 自动调整显示区域的单元(避免出现半个的情况)基于自己的fml加载器 ,要用的自行修改成require.js 或 sea.js<style>*{margin:0;padding:0;}#con{ margin:10px; border:1px solid #f69; width:260px; height:120px;}ul {list-style:none; white-space:nowrap; font-size: 0;}li {display:inline-block; font-size:...
阅读全文
posted @ 2013-06-06 12:24
雨弓
阅读(1015)
推荐(0)
2013年5月20日
摘要:
备份下http://www.1kjs.com/lib/widget/gbk/ 1 /**//**//**//**//**//**//* 2 ** ================================================================================================== 3 ** 类名:J.gbk 4 ** 版本:1.0 5 ** 功能:URLEncode,URLDecode 6 ** 示例: 7 ----------------------------------------------...
阅读全文
posted @ 2013-05-20 16:46
雨弓
阅读(1061)
推荐(0)
2013年5月16日
摘要:
navigator.geolocation.getCurrentPosition(function(position){ //chrome下这会不触发 - -! //如果是setTimeout注册事件是会正常的})while (name = window.prompt (show_word || 'input you nicky') , !name);//如果不在while里也是正常的
阅读全文
posted @ 2013-05-16 16:57
雨弓
阅读(1470)
推荐(0)
2013年4月27日
摘要:
早上来了同事就让看个神奇bug,页面上显示的字符和代码里是反的...看起来跟自动排序里一样<b>123</b>手打一遍html代码后是正常的删除替换大法后定位到 这个字符有鬼 charCodeAt(0) 一下是62 正常的 .. 不甘心charCodeAt(1)出来个8238 看来是这个不可见字符闹的google ascii 8238 从这http://blog.csdn.net/candyguy242/article/details/8476231 得到答案Unicode-控制字符‎LRM‏RLM‍ZWJ
阅读全文
posted @ 2013-04-27 11:02
雨弓
阅读(216)
推荐(0)
2013年4月24日
摘要:
Mutation eventshttps://developer.mozilla.org/en-US/docs/DOM/Mutation_events
阅读全文
posted @ 2013-04-24 20:46
雨弓
阅读(275)
推荐(0)
2013年4月8日
摘要:
今天半个苹果同学要处理getComputedStyle的颜色值,IE下返回的是#FF000这样了 现代浏览器返回的是rgb(255,0,0) 需要做下转换,我正写着代码 他又发我一个url 就是下面这个,是我见过最好的转换代码了 特此记录原文:http://fayaa.com/code/view/200/function zero_fill_hex(num, digits) { var s = num.toString(16); while (s.length < digits) s = "0" + s; return s;}function rgb2hex(rgb)
阅读全文
posted @ 2013-04-08 21:14
雨弓
阅读(12471)
推荐(0)
2013年3月25日
摘要:
(function(window , undefined){ var cache = {}; var etic = window.etic = function (str, data){ str = str.trim() if (!cache[str] ){ var tpl = document.getElementById(str) if (!tpl) throw 'tpl:' + str + ' is not load' tpl = tpl.innerHTML...
阅读全文
posted @ 2013-03-25 12:11
雨弓
阅读(243)
推荐(0)
2013年3月21日
摘要:
(function(window,undefined){ var cache = {}; window.etic = function (str, data){ if (!cache[str] ){ var tpl = $(str)[0].innerHTML var fCon = 'var p = [];' while (true){ var pst = tpl.indexOf('<?') if (pst < 0) { ...
阅读全文
posted @ 2013-03-21 21:07
雨弓
阅读(223)
推荐(0)