Learning Java scripting programming language

  • Java scripting Introduction-:Java scripting is a programming language that can be included on web pages to them more interactive.we can use it check or modify the contents of forms,changes,images open new window and write dynamic page content.we can even use it with css to make DHTM(Dynamic Hyper Text markup Language). This allows you to make parts of your web pages(s) that are on our browser window at any set time.when the user stops viewing that page any script that are running on it are immediately stopped. the only exception is a coolie which can be used by many pages between them even after the page have been closed.
    Java script developed by Microsoft is a client side interpreted object oriented high level scripting language while java is a client side object oriented high level language.
    Java scripting is most popular scripting language on the internet and works in all major browser such as internet explorer Mozilla Firefox Netscape and opera.
  •    java script was designed to add interactivity to html pages.
  •    java script is a scripting language.
  • a script language is a limeweight programming language.
  • a java scripting consists of lines of executable computer code.
  • a java scripting is usually embedded directly into html pages.
  • java scripting is an interpreted language .
  • every one can use java scripting without purchasing a licence.

Different java and java scripting language-: Java and java script are not same . both concept and design are different. java developed by sun micro system and java scripting developed by Microsoft.
Client side:- Programs are passed to the computer that the browser is on,and that computer runs them . The alternative is server side where the program is on the server and only the result are passed to the computer that the browser is on example of this would be php perl,ASP,JSP etc.

Scripting -: this is a little harder to define .scripting language are often used for performing repetitive tasks .Although they may be complete programming language .They do not usually go into the depths of compels program such as thread and memory management . They may use another program to do the work and simply tell it what to do . They often do not create their own user interface and instead will rely on the program to create an interface for them This is quite accurate for java script. We do not have ti tell the browser exactly what to put on the screen for every pixel we just tell it what we want it to change the documents and does it The browser will also take care of the memory management and thread management leaving javascripting free to get on with the things it wants to do.
how to java script constructed-:
The basic part of java scripting is a variable literal or object. A variable is a word of represent a piece of a text a number a Boolean true or false value or an object . a literal the actual number or piece of text or boolean value that the variable represents an object is a collection of variable held together bay a parent variable or a document componet.
The next most important part is scripting is an operator , An operator is assign literal value to variable or say what type of tests to perform.
The next most important part of script is a control structure control structure say what scripts should be run if a test is satisfied.
function collection control structure actions and assignment together and can be hold to run those piece of script as and when necessary .
The most obvious parts of scripting are action it performs . some of these are done with operators but most are done using method Methods are a special kind of function and may do things like submitting forms writing pages or displaying message.
Event can be used to detect action usually created by the user such as moving or clicking the mouse,pressing a key or resetting a form . When triggered events can be used to run functions.
lastly and not quite so obvious is referencing. This is about working out what to write to access the contents of objects or even the objects themselves.
Advantage  of java script over HTML-:

  • Java script gives HTML designers a programming tool -: HTML authors are normally not programmers, but java scripting is a scripting language with a very simple syntax almost anyone can put small “snippets’ of code into their HTML pages.
  • Java scripting can put dynamic Text into an HTML page- A java script statement like this : Document.write(“<h1>”+Name+”<h1>”) can write a variable text into an HTML page.
  • Java script can react to events-: A java script can be set to execute when something happens like when a page has finished loading or when a user clicks on an html elements.
  • Java script can read and write HTML elements.- a Java script can read and change the content of an html elements.
  • java script can be used to validate data-: a java script can be used to validate form data before it is submitted to a server. The saves the server from extra processing.
  • java script can be used to detect the visitors browser -: a java script can be used to detect the visitor’s browser add depending on the browser load another page specially designed for that browser.
  • java script can be used to create cookies-: A java script can be used to store and retrieve information on the visitor’s computer.

How to put a java scripting into HTML page-: To insert a javascript into an html page we use the <script> tag also .

<html>                                                                                                                                         <head>     </head>                                                                                                                <body>                                                                                                                                       <Script language=”javascript” type=”text/javascript”>                                        document.write(“hello world”)                                                                                   </script>                                                                                                              </body>                                                                                                                       </html>

Leave a Comment