Horje

How to add HTML <iframe> sandbox allow-forms Attribute

Allows form submission.

The "Submit" button will submit the form in the inline frame.

Since the sandbox attribute is set to an empty string (""), the submission of the form in the inline frame will be blocked.

Add "allow-forms" to the sandbox attribute, to allow form submission.

index.html
Example: HTML
<!DOCTYPE html>
<html>
<body>

<h1>The iframe sandbox attribute</h1>

<iframe src="https://horje.com" sandbox="allow-forms">
  <p>Your browser does not support iframes.</p>
</iframe>

<p>The "Submit" button will submit the form in the inline frame.</p>
<p>Since the sandbox attribute is set to an empty string (""), the submission of the form in the inline frame will be blocked.</p>
<p>Add "allow-forms" to the sandbox attribute, to allow form submission.</p>

</body>
</html>

Output should be:

How to add HTML <iframe> sandbox allow-forms Attribute




Type:
html
Category:
Web Tutorial
Sub Category:
HTML Tag
Uploaded by:
Admin