简体   繁体   中英

How to submit a form through Javascript in an iPhone SDK application?

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.

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();

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM