日期:2014-05-16 浏览次数:20333 次
var s = "aabbccaaddeeccabfcae"; var kv = {}, chr = false s.replace(/[a-z]/g, function ($0) { if (kv[$0] == undefined) { chr = $0; kv[$0] = 1 } }); alert(chr)