摘要: 一.函数与形参1.函数function abs(x) { if (x >= 0) { return x; } else { return -x; }}alert(abs(-10));2.匿名函数var abs = function (x) { if... 阅读全文
posted @ 2015-08-27 23:58 李雷雷alexkn 阅读(205) 评论(0) 推荐(0) 编辑
摘要: 一.字符串操作1.大小写var s = "hello";undefinedg = s.toUpperCase();"HELLO"g;"HELLO"g.toLowerCase();"hello"View Code2.索引/截断s.indexOf('o');4all.js:1 loading comme... 阅读全文
posted @ 2015-08-27 23:34 李雷雷alexkn 阅读(195) 评论(0) 推荐(0) 编辑