{"json_modified": "2015-04-29T06:50:12.354529", "slug": "Web/JavaScript/Reference/Functions/set", "tags": [], "locale": "zh-CN", "title": "setter", "translations": [{"title": "L'op\u00e9rateur set", "url": "/fr/docs/Web/JavaScript/Reference/Fonctions/set", "tags": ["ECMAScript5", "Functions", "Reference", "JavaScript", "R\u00e9f\u00e9rence", "R\u00e9ference"], "summary": "La syntaxe set
permet de lier une propri\u00e9t\u00e9 d'un objet \u00e0 une fonction qui sera appel\u00e9e \u00e0 chaque tentative de modification de cette propri\u00e9t\u00e9.", "localization_tags": [], "locale": "fr", "last_edit": "2015-04-11T12:09:11", "review_tags": []}, {"title": "setter", "url": "/en-US/docs/Web/JavaScript/Reference/Functions/set", "tags": ["ECMAScript5", "Functions", "JavaScript"], "summary": "The set
syntax binds an object property to a function to be called when there is an attempt to set that property.", "localization_tags": [], "locale": "en-US", "last_edit": "2015-04-11T08:51:54", "review_tags": []}, {"title": "set", "url": "/ja/docs/JavaScript/Reference/Operators/set", "tags": ["ECMAScript5"], "summary": "\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u30d7\u30ed\u30d1\u30c6\u30a3\u306b\u5bfe\u3057\u3066\u3001\u5024\u3092\u8a2d\u5b9a\u3057\u3088\u3046\u3068\u3059\u308b\u3068\u304d\u306b\u547c\u3073\u51fa\u3055\u308c\u308b\u95a2\u6570\u3092\u5272\u308a\u5f53\u3066\u307e\u3059\u3002", "localization_tags": [], "locale": "ja", "last_edit": "2015-04-17T01:39:51", "review_tags": []}], "modified": "2015-04-29T06:50:10", "label": "setter", "localization_tags": [], "url": "/zh-CN/docs/Web/JavaScript/Reference/Functions/set", "last_edit": "2015-04-29T06:49:19", "summary": "set
\u8bed\u6cd5\u53ef\u4ee5\u5c06\u4e00\u4e2a\u51fd\u6570\u7ed1\u5b9a\u5728\u5f53\u524d\u5bf9\u8c61\u7684\u6307\u5b9a\u5c5e\u6027\u4e0a\uff0c\u5f53\u90a3\u4e2a\u5c5e\u6027\u88ab\u8d4b\u503c\u65f6\uff0c\u4f60\u6240\u7ed1\u5b9a\u7684\u51fd\u6570\u5c31\u4f1a\u88ab\u8c03\u7528\u3002", "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.BF.B0", "title": "\u6982\u8ff0"}, {"id": ".E8.AF.AD.E6.B3.95", "title": "\u8bed\u6cd5"}, {"id": ".E5.8F.82.E6.95.B0", "title": "\u53c2\u6570"}, {"id": ".E6.8F.8F.E8.BF.B0", "title": "\u63cf\u8ff0"}, {"id": ".E7.A4.BA.E4.BE.8B", "title": "\u793a\u4f8b"}, {"id": "Example:_Defining_a_getter_with_the_get_operator", "title": "\u5728\u5bf9\u8c61\u521d\u59cb\u5316\u65f6\u5b9a\u4e49 setter"}, {"id": "Example:_Removing_a_setter_with_the_delete_operator", "title": "\u7528 delete \u64cd\u4f5c\u7b26\u79fb\u9664\u4e00\u4e2a setter"}, {"id": ".E4.BD.BF.E7.94.A8_defineProperty_.E4.B8.BA.E5.B7.B2.E5.AD.98.E5.9C.A8.E7.9A.84.E5.AF.B9.E8.B1.A1.E5.AE.9A.E4.B9.89_setter", "title": "\u4f7f\u7528 defineProperty \u4e3a\u5df2\u5b58\u5728\u7684\u5bf9\u8c61\u5b9a\u4e49 setter"}, {"id": ".E4.BD.BF.E7.94.A8_computed_.E5.B1.9E.E6.80.A7.E5.90.8D", "title": "\u4f7f\u7528 computed \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": "SpiderMonkey_.E7.94.A8.E6.88.B7.E6.B3.A8.E6.84.8F", "title": "SpiderMonkey \u7528\u6237\u6ce8\u610f"}, {"id": "See_also", "title": "\u76f8\u5173\u94fe\u63a5"}], "id": 131315, "review_tags": ["editorial"]}