{"json_modified": "2015-04-29T06:50:10.429095", "slug": "Web/JavaScript/Reference/Functions/get", "tags": [], "locale": "zh-CN", "title": "getter", "translations": [{"title": "getter", "url": "/en-US/docs/Web/JavaScript/Reference/Functions/get", "tags": ["ECMAScript5", "ECMAScript6", "Functions", "JavaScript"], "summary": "The get
syntax binds an object property to a function that will be called when that property is looked up.", "localization_tags": [], "locale": "en-US", "last_edit": "2015-04-11T08:49:29", "review_tags": []}, {"title": "get", "url": "/ja/docs/Web/JavaScript/Reference/Operators/get", "tags": ["ECMAScript5", "getter", "\u8981\u66f4\u65b0", "JavaScript"], "summary": "\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u3001\u30d7\u30ed\u30d1\u30c6\u30a3\u304c\u53c2\u7167\u3055\u308c\u305f\u6642\u306b\u95a2\u6570\u304c\u547c\u3073\u51fa\u3055\u308c\u308b\u3088\u3046\u306b\u7d50\u3073\u3064\u3051\u307e\u3059\u3002", "localization_tags": ["inprogress"], "locale": "ja", "last_edit": "2015-04-17T01:38:15", "review_tags": []}, {"title": "L'op\u00e9rateur get", "url": "/fr/docs/Web/JavaScript/Reference/Fonctions/get", "tags": ["ECMAScript5", "Functions", "Reference", "R\u00e9ference", "R\u00e9f\u00e9rence", "JavaScript", "ECMAScript6"], "summary": "La syntaxe get permet de lier une propri\u00e9t\u00e9 d'un objet \u00e0 une fonction qui sera appel\u00e9e lorsqu'on acc\u00e9dera \u00e0 la propri\u00e9t\u00e9.", "localization_tags": [], "locale": "fr", "last_edit": "2015-04-11T12:11:47", "review_tags": []}, {"title": "get", "url": "/es/docs/Web/JavaScript/Referencia/Funciones/get", "tags": ["ECMAScript5", "Operator", "JavaScript"], "summary": "Enlaza la propiedad de un objeto con una funci\u00f3n que puede ser llamada cuando la propiedad es buscada.", "localization_tags": [], "locale": "es", "last_edit": "2015-04-12T04:06:50", "review_tags": []}], "modified": "2015-04-29T06:50:08", "label": "getter", "localization_tags": [], "url": "/zh-CN/docs/Web/JavaScript/Reference/Functions/get", "last_edit": "2015-04-29T06:49:19", "summary": "get
\u8bed\u53e5\u4f5c\u4e3a\u51fd\u6570\u7ed1\u5b9a\u5728\u5bf9\u8c61\u7684\u5c5e\u6027\u4e0a,\u5f53\u8bbf\u95ee\u8be5\u5c5e\u6027\u65f6\u8c03\u7528\u8be5\u51fd\u6570.", "sections": [{"id": "Quick_Links", "title": "JavaScript \u6559\u7a0b: JavaScript \u6307\u5357 Introduction Grammar and types Control flow and error handling Loops and iteration Functions Expressions and operators Numbers and dates Text formatting Regular expressions Indexed collections Keyed collections Working with objects Details of the object model Iterators and generators Meta programming \u5feb\u901f\u5165\u95e8 JavaScript \u57fa\u7840\u77e5\u8bc6 JavaScript \u77e5\u8bc6\u6982\u8981 Javascript \u9762\u5411\u5bf9\u8c61\u7f16\u7a0b \u4e2d\u7ea7\u6559\u7a0b \u6df1\u5165 JavaScript JavaScript \u6570\u636e\u7ed3\u6784 \u5982\u4f55\u6b63\u786e\u5224\u65ad\u76f8\u7b49\u6027 Closures \u9ad8\u7ea7 \u7ee7\u627f\u548c\u539f\u578b\u94fe \u4e25\u683c\u6a21\u5f0f JavaScript \u7c7b\u578b\u5316\u6570\u7ec4 \u5185\u5b58\u7ba1\u7406 Concurrency model and Event Loop \u5f15\u7528: \u5185\u7f6e\u5bf9\u8c61 JavaScript \u6807\u51c6\u5e93 Array ArrayBuffer Boolean DataView Date Error EvalError Float32Array [\u6211\u6765\u8bd1!] Float64Array [\u6211\u6765\u8bd1!] Function Generator [\u6211\u6765\u8bd1!] GeneratorFunction [\u6211\u6765\u8bd1!] Infinity Int16Array [\u6211\u6765\u8bd1!] Int32Array [\u6211\u6765\u8bd1!] Int8Array [\u6211\u6765\u8bd1!] InternalError [\u6211\u6765\u8bd1!] Intl [\u6211\u6765\u8bd1!] Intl.Collator [\u6211\u6765\u8bd1!] Intl.DateTimeFormat [\u6211\u6765\u8bd1!] Intl.NumberFormat [\u6211\u6765\u8bd1!] Iterator [\u6211\u6765\u8bd1!] JSON Map Math NaN Number Object ParallelArray Promise Proxy RangeError [\u6211\u6765\u8bd1!] ReferenceError [\u6211\u6765\u8bd1!] Reflect [\u6211\u6765\u8bd1!] RegExp SIMD [\u6211\u6765\u8bd1!] SIMD.float32x4 [\u6211\u6765\u8bd1!] SIMD.float64x2 [\u6211\u6765\u8bd1!] SIMD.int16x8 [\u6211\u6765\u8bd1!] SIMD.int32x4 [\u6211\u6765\u8bd1!] SIMD.int8x16 [\u6211\u6765\u8bd1!] Set StopIteration [\u6211\u6765\u8bd1!] String Symbol SyntaxError TypeError TypedArray URIError [\u6211\u6765\u8bd1!] Uint16Array [\u6211\u6765\u8bd1!] Uint32Array Uint8Array [\u6211\u6765\u8bd1!] Uint8ClampedArray [\u6211\u6765\u8bd1!] WeakMap WeakSet decodeURI() decodeURIComponent() encodeURI() encodeURIComponent() escape() eval() isFinite() isNaN() null parseFloat parseInt undefined unescape() [\u6211\u6765\u8bd1!] uneval() [\u6211\u6765\u8bd1!] \u8868\u8fbe\u5f0f\u548c\u8fd0\u7b97\u7b26 \u8fd0\u7b97\u7b26 \u7b97\u672f\u8fd0\u7b97\u7b26 \u6570\u7ec4\u63a8\u5bfc\u5f0f \u8d4b\u503c\u8fd0\u7b97\u7b26 \u6309\u4f4d\u64cd\u4f5c\u7b26 \u9017\u53f7\u64cd\u4f5c\u7b26 Comparison operators [\u6211\u6765\u8bd1!] Conditional (ternary) Operator [\u6211\u6765\u8bd1!] \u89e3\u6784\u8d4b\u503c\uff08Destructuring assignment\uff09 Expression closures [\u6211\u6765\u8bd1!] Generator comprehensions [\u6211\u6765\u8bd1!] \u5706\u62ec\u53f7\u8fd0\u7b97\u7b26 Legacy generator function expression [\u6211\u6765\u8bd1!] \u903b\u8f91\u8fd0\u7b97\u7b26 Object initializer [\u6211\u6765\u8bd1!] \u8fd0\u7b97\u7b26\u4f18\u5148\u7ea7 Property accessors [\u6211\u6765\u8bd1!] \u5c55\u5f00\u8fd0\u7b97\u7b26 class expression [\u6211\u6765\u8bd1!] delete \u51fd\u6570\u8868\u8fbe\u5f0f function* expression [\u6211\u6765\u8bd1!] in instanceof new\u8fd0\u7b97\u7b26 super this typeof void \u8fd0\u7b97\u7b26 yield yield* \u8bed\u53e5\u548c\u58f0\u660e Statements Legacy generator function [\u6211\u6765\u8bd1!] block break class [\u6211\u6765\u8bd1!] const continue debugger do...while empty export [\u6211\u6765\u8bd1!] for [\u6211\u6765\u8bd1!] for each...in for...in for...of function \u751f\u6210\u5668\uff08generator\uff09 if...else import [\u6211\u6765\u8bd1!] label let return switch throw try...catch [\u6211\u6765\u8bd1!] var while with \u51fd\u6570 \u51fd\u6570\u548c\u51fd\u6570\u4f5c\u7528\u57df arguments \u7bad\u5934\u51fd\u6570 \u9ed8\u8ba4\u53c2\u6570\u503c \u65b9\u6cd5\u7684\u5b9a\u4e49 \u5269\u4f59\u53c2\u6570 getter setter Classes Classes [\u6211\u6765\u8bd1!] constructor [\u6211\u6765\u8bd1!] extends [\u6211\u6765\u8bd1!] static [\u6211\u6765\u8bd1!] \u66f4\u591a \u8bcd\u6cd5\u6587\u6cd5 JavaScript \u6570\u636e\u7ed3\u6784 \u5c5e\u6027\u7684\u53ef\u679a\u4e3e\u6027\u548c\u6240\u6709\u6743 Iteration protocols \u4e25\u683c\u6a21\u5f0f \u5207\u6362\u5230\u4e25\u683c\u6a21\u5f0f \u6a21\u677f\u5b57\u7b26\u4e32 \u5df2\u5e9f\u5f03\u7684\u7279\u6027 New in JavaScript New in JavaScript Mozilla\u5bf9ECMAScript 5\u7684\u652f\u6301 Firefox \u4e2d ECMAScript 6 \u7684\u5b9e\u73b0\u60c5\u51b5 ECMAScript 7 support in Mozilla [\u6211\u6765\u8bd1!] Firefox JavaScript changelog [\u6211\u6765\u8bd1!] New in JavaScript 1.1 [\u6211\u6765\u8bd1!] New in JavaScript 1.2 [\u6211\u6765\u8bd1!] New in JavaScript 1.3 [\u6211\u6765\u8bd1!] New in JavaScript 1.4 [\u6211\u6765\u8bd1!] JavaScript 1.5 \u7684\u65b0\u7279\u6027 JavaScript 1.6 \u7684\u65b0\u7279\u6027 New in JavaScript 1.7 New in JavaScript 1.8 New in JavaScript 1.8.1 [\u6211\u6765\u8bd1!] JavaScript 1.8.5 \u7684\u65b0\u7279\u6027 \u6587\u6863: \u5e38\u7528\u5217\u8868 \u5168\u90e8\u9875\u9762\u7d22\u5f15 \u65b9\u6cd5\u7d22\u5f15 \u5c5e\u6027\u7d22\u5f15 \u62e5\u6709 \"JavaScript\" \u6807\u7b7e\u7684\u9875\u9762 \u8d21\u732e JavaScript \u6587\u6863\u7ffb\u8bd1\u72b6\u6001 MDN \u9879\u76ee"}, {"id": ".E6.A6.82.E8.A7.88", "title": "\u6982\u89c8"}, {"id": ".E8.AF.AD.E6.B3.95", "title": "\u8bed\u6cd5"}, {"id": ".E5.8F.82.E6.95.B0", "title": "\u53c2\u6570"}, {"id": ".E8.AF.B4.E6.98.8E", "title": "\u8bf4\u660e"}, {"id": ".E5.AE.9E.E4.BE.8B", "title": "\u5b9e\u4f8b"}, {"id": "Example:_Defining_a_getter_with_the_get_operator", "title": "\u5728\u65b0\u5bf9\u8c61\u521d\u59cb\u5316\u65f6\u5b9a\u4e49\u4e00\u4e2agetter"}, {"id": "Example:_Deleting_a_getter_using_the_delete_operator", "title": "\u4f7f\u7528 delete\u64cd\u4f5c\u7b26 \u5220\u9664getter"}, {"id": ".E4.BD.BF.E7.94.A8defineProperty.E5.9C.A8.E5.AD.98.E5.9C.A8.E7.9A.84.E5.AF.B9.E8.B1.A1.E4.B8.8A.E5.AE.9A.E4.B9.89_getter", "title": "\u4f7f\u7528 defineProperty\u5728\u5b58\u5728\u7684\u5bf9\u8c61\u4e0a \u5b9a\u4e49 getter"}, {"id": ".E4.BD.BF.E7.94.A8.E8.AE.A1.E7.AE.97.E5.90.8E.E7.9A.84.E5.B1.9E.E6.80.A7.E5.90.8D", "title": "\u4f7f\u7528\u8ba1\u7b97\u540e\u7684\u5c5e\u6027\u540d"}, {"id": ".E8.A7.84.E8.8C.83", "title": "\u89c4\u8303"}, {"id": ".E6.B5.8F.E8.A7.88.E5.99.A8.E5.85.BC.E5.AE.B9.E6.80.A7", "title": "\u6d4f\u89c8\u5668\u517c\u5bb9\u6027"}, {"id": "See_also", "title": "\u76f8\u5173\u94fe\u63a5"}], "id": 135051, "review_tags": []}