JavaScript小笔记
2015-09-14 21:59
246 查看
function test1 () {
console.log('test1');
}
function test2 () {
console.log('test2');
}
function test3 (test3) {
console.log(test3);
}
function start(type){
var arr=[test1,test2,test3];
var op=arr[type]
if (op) op(123);
}
start(2);
console.log('test1');
}
function test2 () {
console.log('test2');
}
function test3 (test3) {
console.log(test3);
}
function start(type){
var arr=[test1,test2,test3];
var op=arr[type]
if (op) op(123);
}
start(2);
相关文章推荐
- javascript基础知识总结二
- Javascript设计模式与开发实践读书笔记(1-3章)
- 详解回调函数——以JS为例解读异步、回调和EventLoop
- Javascript设计模式与开发实践读书笔记(1-3章)
- js选择checkbox
- js如何判断访问是来自搜索引擎(蜘蛛人)还是直接访问
- JavaScript嵌套函数this的重定向
- 根据user-agent判断蜘蛛代码黑帽跳转代码(js版与php版本)
- backBone.js初识
- JS 正则常用验证
- JSON数据提取的基本方法-2015年9月14日
- JavaScript获取iframe的内容
- js匿名函数
- jsoncpp简单示例
- 解析JSON格式数据
- Struct 基本原理
- Retrofit中使用GSON解析定制格式的JSON
- webapi ,前台json传入raw读取
- JSON 序列化 和 JSON 反序列化
- bzoj1032 [JSOI2007]祖码Zuma