JavaScript-program 1
Posted On Friday, June 12, 2009 at at 12:17 AM by RashedHow to use JavaScript?
In the introductory post of JavaScript language, I write about
how to write the JavaScript language. Here is an elaborated part
of that post.
<html>
<head>
<title>JavaScript</title>
</head>
<body>
<Script Language="JavaScript">
document.write("Welcome to Java World")
</Script>
</body>
</html>
- Explanation
- <Script Language="JavaScript"> is used for creating JavaScript
environment. Actually it is the start of JavaScript lanuage - document.write("Welcome to Java World")
document.write is used for writing anything with JavaScript.
The syntax isdocument.write("......."). Write anything within the brackets. - There is another syntax that is used to write in JavaScript. This is
document.writeln("......."). (writeln is for write line) - </Script> is used to close the JavaScript