Home > Web Front-end > JS Tutorial > body text

JavaScript OOP面向对象介绍_js面向对象

WBOY
Release: 2016-05-16 18:14:52
Original
1231 people have browsed it

OOP 语言使我们有能力自定义对象和变量类型。

面向对象编程
JavaScript 是面向对象的编程语言 (OOP)。OOP 语言使我们有能力定义自己的对象和变量类型。对象拥有属性和方法。

属性
属性指与对象有关的值。

举例:

复制代码 代码如下:



方法
方法指对象可以执行的行为(或者可以完成的功能)。
复制代码 代码如下:


Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!