
js
iteye_18468
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
js 实现 本地图片 预览
js 实现 本地图片 预览[code="html"] /** * 从 file 域获取 本地图片 url */ function getFileUrl(sourceId) { var url; if (navigator.userAgent.indexOf("MSIE")>=1) { // IE url = document.ge...2010-08-26 10:59:59 · 149 阅读 · 0 评论 -
define subclass - js
define subclass - js ------define subclass definition of subclass: assume there are function A and B, if A.prototype.prototype = B.prototype, then A is subclass of B, to complete the ...2012-03-09 14:24:31 · 177 阅读 · 0 评论 -
js closure
js closure scope: in js, inner function has access to params/local variable of the outer function, closure: variable use the scope where they are defined, even apparently the scope is f...2012-03-02 18:21:50 · 112 阅读 · 0 评论 -
js array methods
js array method array has some build-in method, to manipulate array, ------join join array elements and return a string, elements are separated by a separator,the default separator ...2012-03-02 15:14:42 · 183 阅读 · 0 评论 -
js logic operator
logical expression of js && ,||, ! operand: the 3 operator all accept any values as operand, return value: && and || return one of the 2 operand as return value, !...2012-01-16 21:41:00 · 158 阅读 · 0 评论 -
js 检验 Array
[b]检验是否是 Array[/b]工具方法:[code="js"] function checkArray(v) { return Object.prototype.toString.apply(v) === '[object Array]';}[/code]参考:[url]http://stauren.net/log/fqibpxyz3.html[/ur...2011-01-01 20:13:48 · 123 阅读 · 0 评论 -
heap sort
[b]heapsort[/b]------[b]heap 数据结构[/b]heap 是以 nearly complete binary tree 存储数据的,tree height = lg(n+1),max-heap: A[i] >= A[sub(i)], 即 父节点 >= 子节点------[b]heapsort 基本原理[/b]...2010-12-18 19:09:41 · 102 阅读 · 0 评论 -
js 图片延迟加载
图片延迟加载------需求场景:对于长页面,如果有很多图片,则希望,当滚动到图片时才显示图片,------实现原理一开始将 img 的 src 写在 alt 里,而 src 为空,从而不加载图片,为 window 对象绑定 scroll 事件,当滚动时,检测 图片的位置,如果滚动到了图片则 将 从 alt 读值 写入 src,从而显示图片,--...2010-11-20 17:04:02 · 92 阅读 · 0 评论 -
bassistance 's jquery plugin
该网址下有些比较好用的 jquery plugin[url]http://bassistance.de/jquery-plugins/[/url]2010-04-27 13:20:38 · 77 阅读 · 0 评论 -
js 的 null & undefined 判断
[b]判断 null 或 undefined[/b]------[b]判断规则[/b]:* 如果 x = null 或 undefined,则 x==null 和 x==undefined 都返回 true,* typeof typeof(null值)= "object" typeof(undefined值)= "undefined"* 如果...2010-10-25 23:35:23 · 193 阅读 · 0 评论 -
chrome 开发人员工具
chrome 有自己的开发人员工具,类似 firefox 的 firebug,[b]教程:[/b][url]http://www.google.com/support/chrome/bin/static.py?page=guide.cs&guide=29302&topic=29304[/url][b]快捷键:[/b]ctrl+shift+i 或 ctrl+shift+j...2010-10-08 15:33:52 · 148 阅读 · 0 评论 -
andrew-hoyer webside
andrew-hoyer 's webside is fun,with math and programming,so mark it here ...[url]http://www.andrew-hoyer.com[/url]2010-03-05 17:18:04 · 152 阅读 · 0 评论 -
raphael js lib
raphael js 是超级炫的 js 库,提供对 web 矢量图 的支持!兼容各种浏览器,包括 firefox,chrome,opera, Safari,ie ,大小和 jquery 差不多,因此不会影响速度;raphael 首页:[url]http://raphaeljs.com/[/url]...2010-03-05 11:03:13 · 108 阅读 · 0 评论 -
js 倒计时
写了个超简单的 js 倒计时,使用了 jquery1.4.2 库,程序就是1个 html ,可以直接执行,(需要联网,因为引用了在线 jquery 库)倒计时程序:[code="html"] 倒计时 - js // Interval 的 id,用于取消定时 var interId; /** * 根据毫...原创 2010-03-03 18:00:27 · 127 阅读 · 0 评论 -
apply() & call()
[b]apply & call[/b]Function 对象 调用 apply(obj,args),call(obj,args) ,就好像 obj 自己拥有了 对应的 Function 对象 一样,------[b]apply()[/b]function.apply(thisobj, args)invokes the specified function as ...2010-09-24 19:24:38 · 93 阅读 · 0 评论 -
ascii & char & string of js
[b]ascii & char & string[/b]------小知识: * js 中 char 是 string 的1个字符,可用 charAt(index) 获得 * ascii码 是 unicode码 的一部分,ascii 等于 unicode 的前 256 个字符, * ------char -> asciiStirng.charCodeAt...2010-09-11 19:02:05 · 103 阅读 · 0 评论 -
js String trim()
[b]为 js 添加 trim() 功能[/b]js 默认不支持 trim() 方法,但是 firefox 支持该方法,可以通过为 String 类,添加1个自定义 trim() 方法,来实现通用的 trim() 支持,------[b]例子:[/b]regex_test.js[code="js"]/** trim() method for String *...2010-09-10 00:06:24 · 243 阅读 · 0 评论 -
link archor
link archor http://www.xxx.com/me.html#mood, this is a link with a archor, #mood, is the archor part, could be the id/name of a element on the page,(html5 support id, html4 support id & n...2012-04-02 21:26:57 · 158 阅读 · 0 评论