问题
I need to post a form loaded in UIWebview
(iPhone sdk/Objective c) through Javascript injection. I used document.form.submit()
which is not working.
回答1:
To access your form you need to pull it from the forms array. Use form's name attribute as array key
.
This should look like:
document.forms['formName'].submit();
来源:https://stackoverflow.com/questions/3633152/how-to-submit-a-form-through-javascript-in-an-iphone-sdk-application