reactjs - 在外部 iframe 上填充输入
问题描述
我想在加载 iframe 时自动填充网站上的文本框,它应该填写输入文本表单。(我的应用程序和 iframe 不在同一个域中)我想知道是否有解决方案可以使这个可行
解决方案
If you have control over both origins, then you can use the window.postMessage
API to communicate between the iframe and the parent page.
If you do not have control over both origins, I don't think you can do that because of the same-origin policy.
推荐阅读
- scala - 有没有办法从 Scala Shapeless 为 HList 的每个成员派生隐含?
- php - 有多少 PHP 会话可以访问/写入文件/数据库?(+最佳实践)
- firebase - 允许对 Firebase Firestore 中的一个特定集合具有读取权限
- python - 使用视图在 Django 中填充列表
- iterator - Iterating over symbols (assets) in TradeView (Pine @version=4)
- ruby-on-rails - Rails 6 默认绑定到 127.0.0.1?
- sql - 要插入的 countif 的 SQL 语法
- ruby-on-rails - Rails 复杂的活动记录关系
- assembly - 了解炸弹实验室第 5 阶段(两个整数输入)
- php - PHP相关查询