Conditions In Java Script
In this article you learn the basics of JavaScript and create your first JavaScript program.
About JavaScript
Java Script is Netscape's Cross - platform, Object - based Scripting language for Client and Server applications. It is a Case sensitive application. JavaScript programs are usually embedded directly in HTML files. The script executes when the user's browser opens the HTML file. JavaScript is different from the Java language. Now the biggest problem is the imperfect JavaScript implementations that today's browsers offer. Although all major browsers that are version 3.0 or higher include JavaScript code support, they deal with JavaScript differently. In fact, different versions of the same browser handle JavaScript differently. This makes it difficult to create a complicated JavaScript code that work across all browsers. So always check your pages on as many different browsers (and even platforms) as possible.
The Simple Example to display the Sum of two Digits :-
<html> <head> <script language="javascript"> function showAlert() { val1=20; val2=10; document.write("sum="+(val1+val2)); } </script> </head> </body> <script type="text/javascript"> showAlert(); </script> </body> </html> |
JavaScript code is embedded in HTML within a <SCRIPT> tag. It can be used to any number of JavaScript Statements. showAlert() is a function to use in JavaScript language. Val1 and Val2 is a data type. we take the value 20 and 10 in val1 and val2. Document.write is also a function to use print the Message and values. The result is 20 display on the Screen.
Tutorials
- JavaScript method doScroll()
- Popup Window Example in JavaScript
- JavaScript method deleteRow()
- JavaScript Variables and Data types
- Java Script Code of Calendar and Date Picker or Popup Calendar
- JavaScript - JavaScript Tutorial
- Looping In Java Script
- What is JavaScript? - Definition
- Conditional Examples(if - else- switch case) in JavaScript
- Classes-Objects in JavaScript
- String Number Operations in JavaScript
- Conditions In Java Script
- JavaScript - JavaScript Tutorial
- JavaScript Object Oriented Feature
- Form Validation using Regular Expressions is JavaScript
- Navigation with Combo box and Java Script
- Simple Calculator Application In Java Script
- JavaScript Combo Box Validation
- JavaScript createPopup method
- JavaScript appendChild method
- JavaScript add method
- JavaScript addImport example
- JavaScript appendData method
- JavaScript applyElement method Example
- JavaScript blink method
- JavaScript bold method
- JavaScript clear method
- JavaScript clearTimeOut method
- JavaScript click method
- JavaScript cloneNode example
- JavaScript createAttribute method
- JavaScript createCaption method
- JavaScript createComment method
- JavaScript createEventObject method
- JavaScript createTFoot method
- JavaScript createTHead method
- JavaScript deleteCaption method
- JavaScript deleteTFoot method
- JavaScript deleteTHead method
- JavaScript dragDrop method