Skip to content

Instantly share code, notes, and snippets.

View MAYDAY1993's full-sized avatar

MAYDAY1993

  • https://github.com/MAYDAY1993/mayday1993.github.io/issues?q=is%3Aissue+is%3Aopen+label%3A%E6%8A%80%E6%9C%AF
  • Shanghai,China
View GitHub Profile
@sofish
sofish / first.js
Created August 31, 2012 05:47
面试的时候我会经常问,js 中如何获得 <ul> 下的第一个 <li>,你的答案是什么?
// 大家写在评论中吧,代码高亮可以这样写:
// ```js
// your code
// ```
// update: Fri Aug 31 08:39:21
// copyright: https://gist.github.com/3549352
// 加个性能测试:http://jsperf.com/get-dom-s-first-element
var util = {};