坏小仔

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2012年8月21日

摘要: setTimeout(function() { #1/* Some long block of code... */ #1setTimeout(arguments.callee, 10); #1}, 10); #1setInterval(function() { #2/* Some long block of code... */ #2}, 10); #2#1 Sets up a timeout that reschedules itself#2 Sets up an intervalThe two pieces of code in listing 8.1 may appear to be 阅读全文
posted @ 2012-08-21 17:05 坏小仔 阅读(152) 评论(0) 推荐(0) 编辑

摘要: var pattern = /test/;var pattern = new RegExp("test");i (insensitive), g (global), and m (multi-line) /test/ig new RegExp("test","ig"))? i: makes the regex case insenstive. So /test/i matches not only “test”, but also“Test”, “TEST”, “tEsT”, and so on.? g: matches all in 阅读全文
posted @ 2012-08-21 11:09 坏小仔 阅读(115) 评论(0) 推荐(0) 编辑