<html> <body> <script type="text/javascript"> var name = "Hege" document.write(name) document.write("<h1>"+name+"</h1>") </script> <p>This example declares a variable, assigns a value to it, and then displays the variable.</p> <p>Then the variable is displayed one more time, only this time as a heading.</p> </body> </html>
Edit the text above, and click on the button to see the result.
Copyright © 2007-2008, Www.JavaBasics.We.Bs All rights reserved.