Elements links = doc.getElementsByTag("p");
for (Element link : links) {
String linkText = link.text();
System.out.println(linkText+"");
}
} catch (Exception e) {
// TODO: handle exception
}
}这是我根据列子写的怎么不行啊
#6
#7
Document doc = Jsoup.connect("http://www.jtxx0551.com/hfwsslkiframe.action").get(); Elements links = doc.select("p"); for (Element link : links) { String linkText = link.text(); System.out.println(linkText+""); }
#8
Document doc = Jsoup.connect("http://www.jtxx0551.com/hfwsslkiframe.action").get(); Elements links = doc.select("p"); for (Element link : links) { String linkText = link.text(); System.out.println(linkText+""); }
解决了,谢谢你红领巾。加个QQ好友可以吗
#9
公司上不了。有问题就发帖。
#10
方法调用的不对啊
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package test;
Elements links = doc.getElementsByTag("p");
for (Element link : links) {
String linkText = link.text();
System.out.println(linkText+"");
}
} catch (Exception e) {
// TODO: handle exception
}
}这是我根据列子写的怎么不行啊
#6
#7
Document doc = Jsoup.connect("http://www.jtxx0551.com/hfwsslkiframe.action").get(); Elements links = doc.select("p"); for (Element link : links) { String linkText = link.text(); System.out.println(linkText+""); }
#8
Document doc = Jsoup.connect("http://www.jtxx0551.com/hfwsslkiframe.action").get(); Elements links = doc.select("p"); for (Element link : links) { String linkText = link.text(); System.out.println(linkText+""); }
解决了,谢谢你红领巾。加个QQ好友可以吗
#9
公司上不了。有问题就发帖。
#10
方法调用的不对啊
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package test;