Last active
December 18, 2015 13:09
-
-
Save fxxkscript/5787985 to your computer and use it in GitHub Desktop.
微信头像
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var obj = { | |
username: [], | |
id: [] | |
}; | |
$('tr td .betait-tbtd .val-usr').each(function(index, item) { | |
var text = $(item).parents('.betait-tbtd').text(); | |
var arr = text.match(/ID\:(\d*)/m); | |
if (arr && arr.length >= 2) { | |
var id = arr[1]; | |
var username = item.innerText; | |
// if (id >=666 && id <= 717) { | |
obj.username.push(username); | |
obj.id.push(id); | |
// } | |
} | |
}); | |
var img = 'https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxgeticon?seq=620065326&username='; | |
$('<div style="position:absolute; left:0; top: 0; z-index: 1000000;" class="ray"></div>').prependTo('body'); | |
for (var i = 0; i < obj.username.length; i++) { | |
$('<li><span style="color: red;">'+ obj.id[i] + '</span> <img src="' + img + obj.username[i] + '"></li>').appendTo($('.ray')); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment