1
yyfearth 2011-07-19 23:47:44 +08:00
直接找/member/后面的不就可以了?
|
2
chone 2011-07-20 00:16:18 +08:00
var html = document.innerHTML;
html.match(/\/member\/[^\"]*.*class=\"dark\"/g).map(function(item){ return item.match(/\/member\/([^"]*)/)[1]; }) |
3
chone 2011-07-20 00:17:11 +08:00
var html = document.body.innerHTML;
漏了一个 |
6
icyflash 2011-07-20 10:02:57 +08:00
String.match()
http://www.w3school.com.cn/js/jsref_match.asp |
7
yyfearth 2011-07-20 21:33:49 +08:00
@avatasia 晕,用js的谁会去用new RegExp啊,有内建的符号不用/xxxx/igm。String.match(regex)
|
8
chone 2011-07-20 23:57:18 +08:00
@avatasia 两者一样的,和[] new Array() 类似
https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/regexp |