Toggle navigation
Genres
Frontend (2)
JavaScript (6)
Database (2)
Linux Server (3)
Web Apps (4)
Misc (4)
Search
List
New Tutorials
Last Modified Tutorials
</>
Code examples
code
smiko
frontend
html
examples
forms
42passvars_js_textarea.html
42passvars_js_textarea.html
<!DOCTYPE HTML> <html lang="hr"> <head> <meta charset="UTF-8"> <title>JS open form values in new window</title> <script><!-- function gen(){ prozor=window.open("","","toolbar=0,location=1,left=0,top=0,screenX=0,screenY=0"); prozor.resizeTo(600,400); var htm=document.forms[0].html_code.value; prozor.document.write(htm); } --></script> </head> <body> <form action="javascript:gen()" method="POST"> <!-- TEXTAREA for HTML code --> <textarea name="html_code" cols="60" rows="10"> <html> <head> <title>Title</title> </head> <body bgcolor="aqua"> <h3 style="color:red">Header</h3> <p>Some text!</p> </form> </body> </html> </textarea> <!-- TEXTAREA for HTML code end --> <br> <br> <input type="submit" value="Open in new window"> <input type="reset" value="Reset the form"> </form> </body> </html>
Reload page
Preview
W3C validation
Edit Code