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

旧时模样 提交于 2019-12-25 04:40:34

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!