0
Elements nextLinks = doc.select(a[href*=https] || a[href*=http]);

我需要连接 HTTP 和 HTTPS 站点。我怎样才能做到这一点?

4

1 回答 1

1

为此使用,逗号分隔符

以下应该做

Elements nextLinks = doc.select("a[href*=https] , a[href*=http]");

看看这个:选择器语法和这个:使用选择器语法来查找元素

于 2012-12-10T15:03:35.157 回答