@adan
To output JavaScript results into an iframe, you can use the following steps:
1
|
<iframe id="resultFrame"></iframe> |
1 2 3 4 5 |
var iframe = document.getElementById("resultFrame"); var iframeDoc = iframe.contentDocument || iframe.contentWindow.document; // Write the JavaScript results to the iframe iframeDoc.write("<html><body><h1>JavaScript Results</h1><p>Your results here</p></body></html>"); |
1 2 |
var result = "Hello, World!"; iframeDoc.write("<html><body><h1>JavaScript Results</h1><p>" + result + "</p></body></html>"); |
By following these steps, you can output JavaScript results into an iframe on your webpage.