Javascript Classes

javascript.thumbnail

Hello,

Javascript supports different types of OOPS concept. You know basically javascript
is a functional lanugage.
We can make these function to classes and objects as follows:

JavaScript
1
<script type="text/javascript"><!--mce:0--></script>

<input type=”button” name=”man1_butt”
id=”man1_butt” onClick=”man1.get_name(); man1.get_age();”
value=”Man 1″>
<input type=”button” name=”man2_butt” id=”man2_butt”
onClick=”man2.get_name(); man2.get_age();” value=”Man 2″>

We can implement inheritance also using javascript. See below the example:

Click Read more for example

JavaScript
1
<script type="”text/javascript”"><!--mce:1--></script>

<input type=”button” onClick=”car_.display();” value=”car”>
<input type=”button” onClick=”bus_.display();” value=”Bus”>

________________Thank you___________________

1 Comments

One Response to “Javascript Classes”

  1. edgar wise March 1, 2009 at 2:59 pm #

    my email aint working

Leave a Reply

More in general, webworld (81 of 87 articles)


Amazon s3 is a remote file storing system. It is totally different from Normal Servers like Apache, FTP server ...