1,HTML source code£º <html> <head> <title>How to use HTMLTextDevice</title> </head> <body> <script src="jsjava.js"></script> <script> window.onload=function(){ var outputDevice=new HTMLTextDevice("info"); var append=true; var outputStream=new HTMLTextOutputStream(new OutputStream(outputDevice),append); outputStream.println("This is a text output stream!"); outputStream.println("Is append:"+append); } </script> <textarea id="info" rows="6" cols="30"></textarea> </body> </html> 2,The display: