• Skip to main content
  • Skip to search
    • Technologies Overview
    • HTML
    • CSS
    • JavaScript
    • Graphics
    • HTTP
    • APIs
    • Browser Extensions
    • MathML
    • Learn web development
    • Tutorials
    • References
    • Developer Guides
    • Accessibility
    • Game development
    • ...more docs
    • Send Feedback
    • Contribute to MDN
    • Report a content issue 🌐
    • Report a platform issue 🌐
  1. 術語表
  2. Class(類)
  • Change language
  • View in English

Table of contents

  • 了解更多

Class(類)

在物件導向編程(object-oriented programming)中,一個類(Class)定義了一個 object 的性質。類是一個定義了對象的屬性 (properties) 和方法 (methods (en-US)) 的模板,繪製其他更多具體實例對象的「藍圖」。

了解更多

基礎知識

  • 基於類 vs. 基於原型 的編程語言 (像 JavaScript)
  • 在 JavaScript 中使用 functions 當作類
  • 維基百科上的 基於類的編程
  • 維基百科上的 面向對象編程

Found a problem with this page?

  • Source on GitHub
  • Report a problem with this content on GitHub
  • Want to fix the problem yourself? See our Contribution guide.

Last modified: Apr 21, 2021, by MDN contributors

Change your language
  • Web Technologies
  • Learn Web Development
  • About MDN
  • Feedback
  • About
  • MDN Web Docs Store
  • Contact Us
  • Firefox

MDN

Mozilla

© 2005-2021 Mozilla and individual contributors. Content is available under these licenses.

  • Terms
  • Privacy
  • Cookies