Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I have an android app that consists of a webview. It needs to allow users to fill in a form on a webpage and then change the data of the form after the user has clicked submit on the form. The form will use the POST request method.

So my question is, how can I intercept the POST data from the form, change it's values, then send it along?

For example: If there's a web form like this...

<form action="http://www.example.com/do.php" method="post">
    <input type="text" name="name" />
    <input type="text" name="email" />
    <input type="submit" />
</form>

If the user enters name = Steve and email = [email protected] in the form, I want to change the values to name = bob and email = [email protected] in the android app and have the new POST be sent to http://www.example.com/do.php.

Thanks for your help!

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
899 views
Welcome To Ask or Share your Answers For Others

1 Answer

If you are familiar with JavaScript, I would suggest you use JavaScript. I think it's more convenient and easy. This tour tells you how to use JavaScript in a WebView.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...