let tagColor; $.get('https://www.luogu.com.cn/api/user/search?keyword=' + nowurluid, {}, function (res) { tagColor=res['users'][0]['color']; }); console.log(tagColor);
nowurluid可以看做洛谷uid
nowurluid
为什么控制台输出undefined