JavaScript is a scripting language used in many websites. A scripting language is a language, which is easy and fast to learn. It is not compiled like other languages like C++, C#. JavaScript is a client side language and it runs on the client browser. It has been developed by Netscape and because it is so simple it is one of the most used scripting languages. JavaScript can be used on all most known browsers. It can be easily used to interact with HTML elements. You can validate disable buttons, text fields, validate forms, or change the background color of your page. Like each programming language, it contains variables, functions, operators, objects and much more. JavaScript code can be inserted directly in the HTML or you can put it in a separet file with the extension .js and link it to your page.
P.S. Java and JavaScript is not the same.Java is a different language developed by Sun Micro Systems and its mutch more complexe.
Here is an example of javascript:- Code: Select all
<script type="text/javascript">
document.write("Hy There!")
</script>
This script dosen't actually do anything ... it just wrights a text in your window.