如您所见,有两个 <div class="sc-fjhmcy dbJOiq flight-information"></div>
并且,我想使用 class 属性获取元素,但只能使用航班信息值,因为
我认为写成无意义代码的部分(“sc-fjhmcy dbJOiq ...)每天都在变化
我已经尝试过使用此 xmlpath $x('//div[contains(@class, "flight-information)"']
,但它不起作用,
我能做什么?...
答案 0 :(得分:0)
我检查了你的代码,我认为这没有什么大问题。 您需要使用一个类名来获取元素,而不是两个名称,如下所示。 $(".sc-fjhmcy") 然后,这将正确运行。 最好的问候