|
What is JavaScript?
- JavaScript was designed to add Interactivity to HTML pages
- JavaScript is a Scripting Language.
- A scripting language is a lightweight programming language.
- JavaScript is an interpreted language.
- Everyone can use JavaScript without purchasing a license.
I have lot of Javascript Examples in this site. going to learn one by one.
Example : 1
<script type="text/JavaScript">
document. write ("Welcome To Java Script!");
</script>
</head>
Example : 2
<script type="text/JavaScript" >
document. write(" <h1 >This is a heading </h1 >");
document. write(" <p >This is a paragraph. </p >");
document. write(" <p >This is another paragraph. </p >");
</script >
Example : 3
<script type="text/JavaScript" >
//Display a "Good morning Madam" if true
//the time is less than 10 Madam
var d=new Date();
var time=d.getHours();
if (time<10)
{
document.write("Good morning Madam");
}
</script >
|