从java在网页上读写和提交
如何使用Java读取网页、将数据写入表单元素、提交表单以及读取返回的网页 具体来说,我想通过输入学生的注册号、提交并阅读结果页面,从大学网站上查看学生的成绩 如何实现这一点?您可以尝试,这是一个主要用于测试网站的库。但它也非常适合你的场景 例如:从java在网页上读写和提交,java,javascript,html,http,Java,Javascript,Html,Http,如何使用Java读取网页、将数据写入表单元素、提交表单以及读取返回的网页 具体来说,我想通过输入学生的注册号、提交并阅读结果页面,从大学网站上查看学生的成绩 如何实现这一点?您可以尝试,这是一个主要用于测试网站的库。但它也非常适合你的场景 例如: WebConversation wc = new WebConversation(); WebResponse top = wc.getResponse( "http://www.meterware.com/Frames.html" ); //
WebConversation wc = new WebConversation();
WebResponse top = wc.getResponse( "http://www.meterware.com/Frames.html" ); // read a page with two frames
WebResponse summary = wc.getFrameContents( "summary" ); // read the summary frame
WebLink link = summary.getLinkWith( "Cake Recipe" ); // find the link (which targets "details" );
link.click(); // click on it
WebResponse response= wc.getFrameContents( "details" ); // retrieve the details frame
编辑
然后是。我想这是一个品味的问题。你应该更具体一些,因为用户无法理解你是想开发网站还是测试网站。