不废话直接上代码:
function objUserNickName(UserName, NickName)
{
this.UserName = UserName;
this.NickName = NickName;
}
objuser1 = new objUserNickName();
objuser1.UserName = TopUserNameNickName[i].dataset.username;
objuser1.NickName = $(TopUserNameNickName[i]).find(\"div\").eq(2).find(\"h3\")[\"0\"].innerText;
var ary = new Array();
ary.push(objuser);
return JSON.stringify(ary);