javascript
文章平均质量分 55
bachelorchen
这个作者很懒,什么都没留下…
展开
-
download uri form image
Following is some piece of code I used to download some example images from google earth view原创 2014-11-18 11:30:26 · 542 阅读 · 0 评论 -
why not the search engine build index for special character
like the !== in javascript原创 2015-11-03 21:24:10 · 289 阅读 · 0 评论 -
bootstrap static modal
modal 显示后,点击空白处不去 hide modal modal × Modal title {backdrop:"stati原创 2015-06-08 13:50:24 · 622 阅读 · 0 评论 -
Some material form web for Understanding javascript
http://dmitrysoshnikov.com/ecmascript/javascript-the-core/JavaScript Module Pattern: In-Depth原创 2015-05-13 11:37:35 · 324 阅读 · 0 评论 -
jquery, delete some specific child nodes
delete all the non-button child nodes of $('campaign-labels') Souhu app test test for sohu mobile 搜狐测试-勿动$(level + '-labels').contents().filter(function(){this.type != 'button';原创 2015-04-13 11:00:11 · 321 阅读 · 0 评论 -
bootstrap label class
想要用 js 生成下面代码的效果 Success Success Success Success原创 2015-04-07 18:13:47 · 2753 阅读 · 0 评论 -
base64 encode with javascript
/** * Base64 encode algorithm * @param {byte array} the binary data of image * @return {datauri} */var Base64 = { // private property _keyStr : "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrst原创 2015-03-17 18:03:14 · 438 阅读 · 0 评论 -
3-ways-to-define-a-javascript-class/
http://www.phpied.com/3-ways-to-define-a-javascript-class/转载 2015-03-19 19:50:15 · 379 阅读 · 0 评论 -
get an image file with XMLHttpRequest and encode with base64
var xhr = new XMLHttpRequest(); var imgurl = "http://lh5.ggpht.com/-ZpKKJYkqobU/ULk2lb2yh5I/AAAAAAAAAAA/z74Pv1Zbfjc/photo.jpg"; xhr.open('GET', imgurl, true); xhr.responseType原创 2014-11-25 21:16:34 · 716 阅读 · 0 评论 -
window.onunload, window.onbeforunload
在这里用到的是 onbeforeunload 事件。下面就梳理下 onunload、onbeforeunload 这两个事件,也顺带说说我遇到的问题与解决方案。onunload,onbeforeunload都是在刷新或关闭时调用,可以在脚本中通过 window.onunload来调用。区别在于onbeforeunload在onunload之前执行,它还可 以阻止onunload的执行。原创 2014-11-23 22:56:43 · 1851 阅读 · 0 评论 -
invert images pixels
gimp, color menu -> invertpython:import osfrom PIL import Imageimport PIL.ImageOpsdef main(): oridir = '../imagesOrig/' photos = os.listdir(oridir) for p in photos: if p.endswith('原创 2014-11-25 21:11:30 · 372 阅读 · 0 评论 -
What's the returned value of javascript constructor function
relevanceExample:原创 2014-11-19 23:38:54 · 384 阅读 · 0 评论