首页 > 解决方案 > iframe 与对象 - 安全建议 - 如何嵌入外部表单

问题描述

我想在我的网站中嵌入一个外部表单。什么是更安全的,最好的方法?

外部表单(允许表单)也有一个日期选择器(允许脚本),我想在提交时在新窗口/选项卡(允许弹出窗口)中打开它。

使用 iframe 我需要这些权限才能使其工作:

<iframe sandbox="allow-forms allow-scripts allow-popups" src="https://www.example.com/someform.php?withparams=123".. >

使用对象添加特定类型:

<object type="text/html" typemustmatch data="https://www.example.com/someform.php?withparams=123" .. >

什么是更好的解决方案,更安全,为什么?

提前致谢。

标签: securityiframehtml-object

解决方案


推荐阅读