一

{"type":"编程笔记"}


  • Home

  • Archives
  • Search

javascript expression '\s'=='s' is true in ie6

Posted on 2009-02-03   |   In javascript

在ie6中,以下表达式返回true,这是不正确的,需要多加注意。

Read more »

页面重定向与url中的hash在不同的浏览器中的表现

Posted on 2009-01-09   |   In web

访问时url上带有hash(如http://localhost/a.php#test),重定向到b.php页面时,当前a.php页上hash会被带到b.php页面上,在firefox/opera上测试的效果是如此,但ie6上则直接到b.php页,不会将a.php页上hash值带过来。示例代码:

a.php

Read more »

difference of string.match and regexp.exec

Posted on 2009-01-06   |   In javascript

The match() method is the most general of the String regular-expression methods. It takes a regular expression as its only argument (or converts its argument to a regular expression by passing it to the RegExp() constructor) and returns an array that contains the results of the match. If the regular expression has the g flag set, the method returns an array of all matches that appear in the string. For example:

Read more »

rails module include way

Posted on 2009-01-06   |   In ruby

以下方式的代码在rails中源码中的相当多见,其中的self.included(base)方法是一个回调方法,当此module被其他名为base的module (或者class) included的时候触发此方法。通过class_eval,include,extend加入了实例方法和类方法到base中,代码划分得很干净。

Read more »

trap of in_array in php

Posted on 2009-01-03   |   In php

trap of php in_array function

Read more »
1…596061…99
yuweijun

yuweijun

492 posts
12 categories
RSS
GitHub Twitter
© 2021 yuweijun
Powered by Hexo
Theme - NexT.Mist.KISS