http://blog.sina.com.cn/s/blog_7812e9860100w9ol.html  

   有详细解释以及代码……