Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
作为标题,我想得到“alt”的文字,但是在Htmlparser的ImageTag中没有方法,谁能帮助我,谢谢。
使用 jquery,您可以使用:
var TextAlt = $('img').attr('alt');
使用 Java:
for(Element imgElement : img) { String imgAlt = imgElement("alt"); }