简体   繁体   English

如何在Ionic中将表单的目标更改为应用内浏览器?

[英]How to change a form's target to in-app browser in Ionic?

I am using the Ionic framework to build an android app. 我正在使用Ionic框架来构建android应用。

I have a form as such: 我有这样的形式:

<form action='https://secure.payu.in/_payment' method="POST" target="...">
  ......
</form>

Is there a way to change the form's target to an instance of a cordova in-app broswer? 有没有办法将表单的目标更改为cordova应用内浏览器实例?

I have tried "_blank" but that disconnects my app from the web-view. 我已经尝试过“ _blank”,但是这使我的应用程序与网络视图断开了连接。

The only solution I could find thus far was making use of iframes. 到目前为止,我唯一能找到的解决方案是使用iframe。

I give the name of an iframe in the target attribute in the form. 我在表单的target属性中提供iframe的名称。

<form action='https://secure.payu.in/_payment' method="POST" target="iframe">
  ......
</form>

<iframe name="iframe"></iframe>

However this causes concerns of security. 但是,这引起了安全隐患。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在Ionic中将表单数据发布到应用程序内浏览器? - How to POST form data to an in-app browser in Ionic? 如何在离子3应用程序的openid appauth流程中显示应用程序内浏览器? - How to display In-App browser for openid appauth flow for ionic 3 application? 如何检测 Facebook 应用内浏览器? - How to detect Facebook in-app browser? 如何更改浏览器后退按钮的目标网址 - How to change target url of browser's back button 如何在外部浏览器而不是应用内(instagram、iPhone)中打开链接? - How to open link in external browser instead of in-app (instagram, IPhone)? 我如何在应用内浏览器中使用“beforeinstallprompt” - How can i use “beforeinstallprompt” for in-app browser 如何在外部浏览器而不是应用内打开链接? - How to open link in external browser instead of in-app? 如何突破Android中的Twitter应用内浏览器? - How to break out of Twitter in-app browser in Android? 如何在 Facebook 应用内浏览器中接收 postmessage? - How to receive postmessage inside Facebook in-app browser? 通过 facebook 移动应用内浏览器完成表单提交 - form submit done as get when via facebook mobile in-app browser
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM