
javaScript
文章平均质量分 65
iteye_9867
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
JavaScript patterns 笔记(一) 全局变量
1. 全局变量: myglobal = "hello"; // antipattern console.log(myglobal); // "hello" console.log(window.myglobal); // "hello" console.log(window["myglobal"]); // "hello" ...原创 2011-05-30 22:35:08 · 164 阅读 · 0 评论 -
JavaScript patterns 笔记(二) 变量声名
1. 单一 var 模式: 在函数体的最上部只使用一个 var 声名变量,好处: a) 只在一个地方提供函数中使用的所有的变量 b) 阻止因变量没有声名就被使用所引起的逻辑错误 c) 能够帮助你想到要声名变...原创 2011-05-30 22:40:49 · 163 阅读 · 0 评论 -
JavaScript Patterns 笔记(三) 循环
For循环 遍历arrays或array-like对象(如:arguments、HTMLCollection) // sub-optimal loop for (var i = 0; i < myarray.length; i++) { // do something with myarray[i] } 每次循环都会去访问myarray的长度,因此会降低效率,尤其myarray不...原创 2011-05-31 15:21:23 · 165 阅读 · 0 评论 -
js checkbox 单选
<h3>5. 如果您在***网预订过酒店,预订过的是几星级的酒店?(可多选) </h3> <div id="item5"> <input name="hotelStar" id="hotelStar-1" value="1" type="checkbox">经济型 <inp2010-12-14 21:21:42 · 175 阅读 · 0 评论 -
(转) JQuery 插件 Autocomplete——输入自动提示 参数文档
原文地址:http://docs.jquery.com/Plugins/Autocomplete/autocomplete autocomplete ( url or data, [ options] ) Options: autoFill Boolean Default: false Fill the textinpu...原创 2011-05-04 14:55:52 · 159 阅读 · 0 评论