I\'m currently working on a form which includes some file inputs to upload pictures. There is an onchange() event for those inputs that submits the pictures to
onchange()
You can use data: URL in the src:
data:
src
var html = 'Hello from '; var iframe = document.querySelector('iframe'); iframe.src = 'data:text/html,' + encodeURIComponent(html);
Difference between srcdoc=“…” and src=“data:text/html,…” in an iframe.
Convert HTML to data:text/html link using JavaScript.