如何填写表格数据在网站上 [英] How to fill out form data on a website

查看:151
本文介绍了如何填写表格数据在网站上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要寻找开发一个应用程序,将登录信息从用户,去一个网站,登录,网页上的返回值,然后将它们显示给手机用户。

I am looking to develop an app that will take login details from the user, go to a website, login, return values on the web page and then display them to the user on the phone.

Java的确实有这个functionallity?我将需要使用JavaScript,而不是可能?就这些问题的答案取决于网站,我想访问?

Does java have this functionallity? Will I need to use javascript instead maybe? do these answers depend on the website that I am trying to access?

在我的脑子里,我的身影,我可以只读取PARAMATERS字符串或字符,解析网页的适当形式和粘贴的适当的值到表单盒子。不过,我从来没有尝试这样的事与编码,所以我完全新的想法,真的不知道从哪里开始。我试着谷歌上搜索周围,但我发现任何信息要么不相关的或有冲突的。

In my head I figure that I could just read in the paramaters as strings or chars, parse the webpage for the appropriate form and "paste" the appropriate value into the form "box". However, I have never attempted anything like this with coding so I am completely new to the idea and dont really know where to start. I tried googling around but any information that I found was either irrelevant or conflicting.

我不是找code这样做,因为我不会真正了解anythig从,但在正确的方向用手指将是巨大的。我真的想在程序尝试变得更好所以这就是为什么我已经开始给自己留下这些小方项目

I'm not looking for the code to do it because I will not really learn anythig from that but a finger in the right direction would be great. I really do want to try get better at programming so that's why I've started to give myself these little side projects

这可以提供任何帮助将是巨大的。

Any help that can be offered would be great

推荐答案

伊恩
      您可以尝试使用HTTP客户端(http://hc.apache.org/httpclient-3.x/)LIB来自Apache。它可以让亲语法访问网站(从Java code)。你需要做以下事情

Ian, You can try using http-client (http://hc.apache.org/httpclient-3.x/) lib from apache. It lets to pro grammatically access a website (from a Java code). You will need to do the following things


  1. 使用HTTP客户端的lib把数据上传到网站。

  2. 接收HTML响应。

  3. 使用某些HTML解析器或XPath从响应HTML中检索值。

这篇关于如何填写表格数据在网站上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆