SEO Software
Closed Thread
Results 1 to 3 of 3

Thread: What is JavaScript?

  1. #1

    Default What is JavaScript?

    Hi all,
    JavaScript is a compact, object-based scripting language for Web pages. JavaScript code embedded into your HTML pages can enhance them with many interesting elements, from swapping images when you move a cursor over them, to multi-level drop-down menus.

    You can create really sophisticated and almost application-like pages with the help of JavaScript. You don't need any special software other than a text editor and a Web browser, and you don't need access to a Web server. You can create and test all your JavaScript code right on your own computer.

    JavaScript and Java
    Although the names are almost the same, JavaScript isn't the same as Java. These are two different techniques for Internet programming. Java is a real programming language, and you can create real programs with it.

    JavaScript is a scripting language. You could even say that JavaScript is rather an extension to HTML than a separate computer language. It's so tightly integrated with HTML that you could call it "JavaScript markup language." JavaScript coders don't care too much about real programming, they just make different nice effects by inserting small JavaScript code fragments into their Web pages.

    The drawbacks of JavaScript
    Right 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 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.

    What do JavaScript code look like?
    Like HTML, JavaScript is just text that can be typed into a text editor. Its code is embedded in HTML within a <SCRIPT> tag. Some old browsers don't understand this tag. To prevent them from treating your JavaScript as HTML, always use this trick involving HTML comments...

    Code:
    <script type="text/javascript">
    <!-- hide JavaScript code from old browsers
    YOUR SCRIPT HERE
    // end the hiding comment -->
    </script>


    Here's an example of JavaScript code that prints current date in the top right corner of your Web page...
    Code:
    <html>
    <head>
    <script type="text/javascript">
    <!--
    function PrintDate() {
    today = new Date();
    document.write('Date: ', today.getMonth()+1, '/', today.getDate(), '/', today.getYear());
    }
    //-->
    </script>
    </head>

    <body>
    <p align="right">
    <script type="text/javascript">
    <!--
    PrintDate();
    //-->
    </script>
    </p>
    THE REST OF YOUR PAGE.
    </body>
    </html>
    Thanks & regards,
    Lokananth
    Live Chat Software By miOOt


  2. SEO Software

  3. #2
    Junior Member alibaba-clone is on a distinguished road alibaba-clone's Avatar
    Join Date
    Dec 2009
    Location
    Johannesburg, South Africa
    Posts
    92
    Thanks
    0
    Thanked 4 Times in 4 Posts

    Default

    in simple words, javascript is client side scripting. that runs on browser and not on server.

  4. #3

    Default

    Javascript is a client side scripting mainly use for validation purpose or any other client side functionality

Closed Thread

Similar Threads

  1. Javascript is not working in IE 7
    By urvisoni in forum SEO Forum
    Replies: 5
    Last Post: 06-16-2009, 02:50 PM
  2. Javascript
    By Avss in forum Design and Development
    Replies: 1
    Last Post: 05-26-2009, 03:20 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts