![]() |
Definition and UsageThe When the
The value of the Browser SupportThe numbers in the table specify the first browser version that fully supports the attribute. |
Example:
HTML
<!DOCTYPE html>
<html>
<body>
<h1>The iframe sandbox attribute</h1>
<iframe src="demo_iframe_sandbox.htm" sandbox>
<p>Your browser does not support iframes.</p>
</iframe>
<p>The "Get date and time" button will run a script in the inline frame.</p>
<p>Since the sandbox attribute is set, the content of the inline frame is not allowed to run scripts.</p>
<p>You can add "allow-scripts" to the sandbox attribute, to allow the JavaScript to run.</p>
</body>
</html>
html sandbox attribute |
How to add An <iframe> with extra restrictions - HTML sandbox Attribute | HTML Attribute |
Read Full: | HTML Attribute |
Type: | Develop |
Category: | Web Tutorial |
Sub Category: | HTML Attribute |
Uploaded by: | Admin |
Views: | 41 |
Reffered: https://www.w3schools.com/tags/att_sandbox.asp