User Rating: 2 / 5

Star ActiveStar ActiveStar InactiveStar InactiveStar Inactive
 

In JavaScript , it will attempt to assume that everything is an object (Objects) to do it. This is for ease of programming objects (Objects) , but it is composed of two main elements .

 

1. Properties are values associated with objects.

Object is assumed that the shirt was too Properties shirt brand, weight, color, price.

Suppose you Propeties Object as it 's you, it's like sex, age , weight and height .

Example:

<html>
<body>
<script>
var shirt=new Object();
shirt.name="Billabong";
shirt.color="blue";
shirt.price="60 USD"; 
document.write("The brand is - " +shirt.name +"<br> The Color is - " + shirt.color + "<br>Price - " +shirt.price);
</script>
</body>
</html>

This is the result:

 

2. Methods are actions that objects can perform.

Radio. Play () Play the tape. 

Radio. Stop () stops 

Door. Lock () Locks 

Cars. Brake () stop. 

Example:

<html> 
<body> 
<script> 
var str = new String ("MindPHP"); 
document.write (str.link ("http://www.Mindphp.com")); 
</script> 
</body> 
</html>

This is the result:

 

 

Next

 

Recent Topics
Subject
Post Reply
Open
Recent
Business Analyst Training
By NehaaB Fri 29 Nov 2019 5:27 pm Board English Language
0
158
Fri 29 Nov 2019 5:27 pm By NehaaB
Program convert area
By prmindphp Wed 27 Nov 2019 11:26 am Board English Language
0
162
Wed 27 Nov 2019 11:26 am By prmindphp
Program exchange rate - Information form Bank of Thailand API
By prmindphp Tue 26 Nov 2019 2:34 pm Board English Language
0
139
Tue 26 Nov 2019 2:34 pm By prmindphp
Tracking Thailand Post Program
By prmindphp Mon 25 Nov 2019 5:47 pm Board English Language
0
180
Mon 25 Nov 2019 5:47 pm By prmindphp
Square Root Calculate Program
By prmindphp Fri 22 Nov 2019 11:30 am Board English Language
0
229
Fri 22 Nov 2019 11:30 am By prmindphp
The program calculates the mean, the variable, the standard deviation
By prmindphp Fri 22 Nov 2019 11:12 am Board English Language
0
204
Fri 22 Nov 2019 11:12 am By prmindphp
Introducing the new Mindphp.com Webboard system function (phpbb v.3.2)
By numtan5839 Tue 19 Nov 2019 6:06 pm Board English Language
0
217
Tue 19 Nov 2019 6:06 pm By numtan5839
The most popular currency pairs in the Forex for new traders
By numtan5839 Mon 18 Nov 2019 5:32 pm Board English Language
0
173
Mon 18 Nov 2019 5:32 pm By numtan5839
BIG DATA and Hadoop
By Inglejyoti Mon 18 Nov 2019 4:03 pm Board English Language
0
285
Mon 18 Nov 2019 4:03 pm By Inglejyoti
The most popular currency in the Forex
By numtan5839 Mon 18 Nov 2019 3:24 pm Board English Language
0
171
Mon 18 Nov 2019 3:24 pm By numtan5839
How to use the SQRT function in Excel
By numtan5839 Mon 18 Nov 2019 2:46 pm Board English Language
0
199
Mon 18 Nov 2019 2:46 pm By numtan5839
Deposit money into account with Thailand Post by Bank@post service
By numtan5839 Mon 18 Nov 2019 11:42 am Board English Language
0
348
Mon 18 Nov 2019 11:42 am By numtan5839
Benefits and applications of moving averages
By numtan5839 Mon 18 Nov 2019 10:47 am Board English Language
0
187
Mon 18 Nov 2019 10:47 am By numtan5839
Moving Average
By numtan5839 Sat 16 Nov 2019 2:45 pm Board English Language
0
211
Sat 16 Nov 2019 2:45 pm By numtan5839
weighted arithmetic mean
By numtan5839 Sat 16 Nov 2019 11:56 am Board English Language
0
178
Sat 16 Nov 2019 11:56 am By numtan5839
Digital Marketing Training in Mumbai
By Kanchaan Fri 15 Nov 2019 6:10 pm Board English Language
1
841
Fri 06 Dec 2019 3:16 pm By benjamin28
Thailand Post appease e-commerce with ePacket service
By numtan5839 Fri 15 Nov 2019 5:59 pm Board English Language
0
313
Fri 15 Nov 2019 5:59 pm By numtan5839
The character that precedes Tracking Number - Thailand Post Track & Trace
By numtan5839 Fri 15 Nov 2019 5:09 pm Board English Language
0
160
Fri 15 Nov 2019 5:09 pm By numtan5839
downloading MD Watermark
By bfred Fri 04 Oct 2019 3:21 pm Board English Language
6
1420
Mon 30 Dec 2019 7:26 pm By mindphp
Features Review : Component Mjform Advance untuk meningkatkan form atau borang untuk laman web dgn lebih baik
By abdkode Mon 22 Apr 2019 6:51 pm Board Bahasa Language
0
9760
Mon 22 Apr 2019 6:51 pm By abdkode