JavaScript Object Base Introduction

In this article I am going to explain about JavaScript object base introduction.
  • 2030

JavaScript Objects Introduction

JavaScript is an object base programming language. It means every word done by object. In object base programming language we can defined own type of variable by the defined the own type of object. In JavaScript we can defined own type of function. And its can be call within the script or within another function. Function can be defined within head section of the document or body section of the document.

How to defined a function in JavaScript

<head>

    <script type="text/jscript">

        function myfunction() {

            alert("Welcome");

        }

    </script>

</head>

How to call JavaScript function

<html>

<head>

    <script type="text/javascript">

        function test() {

            alert("Welcome");

        }

    </script>

</head>

<body>

    <button onclick="test()">

        click</button>

</body>

</html>

Output

intro.gif

Further Readings
 

You may also want to read these related articles: here
Ask Your Question 
 
Got a programming related question? You may want to post your question here
 

Categories

More Articles

© 2020 DotNetHeaven. All rights reserved.