{"json_modified": "2015-05-29T19:30:00.838921", "slug": "Web/API/Document/getElementsByClassName", "tags": [], "locale": "zh-CN", "title": "Document.getElementsByClassName()", "translations": [{"title": "Document.getElementsByClassName()", "url": "/en-US/docs/Web/API/Document/getElementsByClassName", "tags": ["API", "Reference", "R\u00e9f\u00e9rence", "Method", "HTML5", "Gecko DOM Reference", "DOM", "Gecko", "DOM Element Methods"], "summary": "Returns an array-like object of all child elements which have all of the given class names. When called on the document object, the complete document is searched, including the root node. You may also call getElementsByClassName() on any element; it will return only elements which are descendants of the specified root element with the given class names.", "localization_tags": [], "locale": "en-US", "last_edit": "2015-02-21T09:56:01", "review_tags": []}, {"title": "document.getElementsByClassName", "url": "/pt-PT/docs/DOM/document.getElementsByClassName", "tags": ["Refer\u00eancia_do_DOM_Gecko"], "summary": "", "localization_tags": [], "locale": "pt-PT", "last_edit": "2014-10-23T12:46:15", "review_tags": []}, {"title": "document.getElementsByClassName", "url": "/ja/docs/Web/API/Document/getElementsByClassName", "tags": ["Gecko DOM Reference", "DOM", "Gecko", "\u8981\u66f4\u65b0"], "summary": "", "localization_tags": [], "locale": "ja", "last_edit": "2014-10-28T08:21:36", "review_tags": []}, {"title": "document.getElementsByClassName", "url": "/fr/docs/Web/API/Document/getElementsByClassName", "tags": ["R\u00e9f\u00e9rence_du_DOM_Gecko"], "summary": "", "localization_tags": [], "locale": "fr", "last_edit": "2014-10-23T20:42:48", "review_tags": []}, {"title": "Document.getElementsByClassName()", "url": "/ru/docs/Web/API/Document/getElementsByClassName", "tags": [], "summary": "\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043c\u0430\u0441\u0441\u0438\u0432 \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0445 \u0435\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u043c\u0443 \u0438\u043c\u0435\u043d\u0438 \u043a\u043b\u0430\u0441\u0441\u0430. \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u0432\u044b\u0437\u043e\u0432\u0430 \u043d\u0430 \u043e\u0431\u044a\u0435\u043a\u0442\u0435 'document', \u043f\u043e\u0438\u0441\u043a \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u043e \u0432\u0441\u0435\u043c\u0443 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0443, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0439 \u0435\u043b\u0435\u043c\u0435\u043d\u0442. \u0412\u044b \u0442\u0430\u043a \u0436\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c getElementsByClassName()\u00a0 \u043d\u0430 \u043b\u044e\u0431\u043e\u043c \u0435\u043b\u0435\u043c\u0435\u043d\u0442\u0435, \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c \u0440\u0430\u0431\u043e\u0442\u044b \u0431\u0443\u0434\u0435\u0442 \u043c\u0430\u0441\u0441\u0438\u0432 \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0445 \u0435\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0441 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u043c \u0438\u043c\u0435\u043d\u0435\u043c \u043a\u043b\u0430\u0441\u0441\u0430, \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0433\u043e \u0435\u043b\u0435\u043c\u0435\u043d\u0442\u0430.", "localization_tags": ["inprogress"], "locale": "ru", "last_edit": "2015-04-10T05:02:55", "review_tags": []}], "modified": "2015-05-29T19:29:59", "label": "Document.getElementsByClassName()", "localization_tags": ["inprogress"], "url": "/zh-CN/docs/Web/API/Document/getElementsByClassName", "last_edit": "2015-05-29T19:29:56", "summary": "\u8fd4\u56de\u4e00\u4e2a\u7c7b\u4f3c\u6570\u7ec4\u7684\u5bf9\u8c61\uff0c\u5305\u542b\u4e86\u6240\u6709\u6307\u5b9a class \u540d\u79f0\u7684\u5b50\u5143\u7d20\u3002\u00a0Returns an array-like object of all child elements which have all of the given class names. When called on the document object, the complete document is searched, including the root node. You may also call getElementsByClassName() on any element; it will return only elements which are descendants of the specified root element with the given class names.", "sections": [{"id": "Quick_Links", "title": "Document \u5c5e\u6027 document.activeElement Document.alinkColor [\u6211\u6765\u8bd1!] document.anchors document.applets document.async Document.bgColor [\u6211\u6765\u8bd1!] document.body document.characterSet ParentNode.childElementCount ParentNode.children document.compatMode document.contentType document.currentScript Document.defaultView document.designMode Document.dir [\u6211\u6765\u8bd1!] document.doctype document.documentElement document.documentURI document.documentURIObject Document.domain [\u6211\u6765\u8bd1!] Document.domConfig [\u6211\u6765\u8bd1!] document.embeds document.fgColor Element.firstElementChild Document.forms Document.head document.height document.images document.implementation document.inputEncoding Element.lastElementChild document.lastModified document.lastStyleSheetSet document.linkColor document.links Document.location document.mozFullScreen document.mozFullScreenElement document.mozFullScreenEnabled Document.mozSyntheticDocument [\u6211\u6765\u8bd1!] GlobalEventHandlers.onabort [\u6211\u6765\u8bd1!] element.onafterscriptexecute element.onbeforescriptexecute GlobalEventHandlers.onblur GlobalEventHandlers.onchange GlobalEventHandlers.onclick [\u6211\u6765\u8bd1!] GlobalEventHandlers.onclose [\u6211\u6765\u8bd1!] GlobalEventHandlers.oncontextmenu GlobalEventHandlers.ondblclick GlobalEventHandlers.onerror [\u6211\u6765\u8bd1!] GlobalEventHandlers.onfocus GlobalEventHandlers.oninput GlobalEventHandlers.onkeydown GlobalEventHandlers.onkeypress GlobalEventHandlers.onkeyup GlobalEventHandlers.onload GlobalEventHandlers.onmousedown GlobalEventHandlers.onmousemove GlobalEventHandlers.onmouseout GlobalEventHandlers.onmouseover GlobalEventHandlers.onmouseup Document.onoffline [\u6211\u6765\u8bd1!] Document.ononline [\u6211\u6765\u8bd1!] GlobalEventHandlers.onreset [\u6211\u6765\u8bd1!] window.onresize GlobalEventHandlers.onscroll GlobalEventHandlers.onselect GlobalEventHandlers.onsubmit Document.origin [\u6211\u6765\u8bd1!] Document.plugins [\u6211\u6765\u8bd1!] Document.pointerLockElement [\u6211\u6765\u8bd1!] Document.popupNode [\u6211\u6765\u8bd1!] Document.preferredStyleSheetSet [\u6211\u6765\u8bd1!] document.readyState document.referrer Document.scripts Document.scrollingElement [\u6211\u6765\u8bd1!] Document.selectedStyleSheetSet [\u6211\u6765\u8bd1!] Document.styleSheets Document.styleSheetSets [\u6211\u6765\u8bd1!] Document.title document.tooltipNode document.URL Document.vlinkColor [\u6211\u6765\u8bd1!] document.width Document.xmlEncoding [\u6211\u6765\u8bd1!] Document.xmlVersion [\u6211\u6765\u8bd1!] \u65b9\u6cd5 Document.adoptNode() [\u6211\u6765\u8bd1!] Document.caretPositionFromPoint() Document.caretRangeFromPoint() [\u6211\u6765\u8bd1!] Document.clear() [\u6211\u6765\u8bd1!] document.close document.createAttribute Document.createCDATASection() [\u6211\u6765\u8bd1!] document.createComment Document.createDocumentFragment() Document.createElement() [\u6211\u6765\u8bd1!] Document.createElementNS() [\u6211\u6765\u8bd1!] Document.createEntityReference() [\u6211\u6765\u8bd1!] Document.createEvent() [\u6211\u6765\u8bd1!] document.createExpression Document.createNodeIterator() [\u6211\u6765\u8bd1!] Document.createNSResolver() [\u6211\u6765\u8bd1!] Document.createProcessingInstruction() [\u6211\u6765\u8bd1!] Document.createRange() document.createTextNode Document.createTouch() [\u6211\u6765\u8bd1!] Document.createTouchList() [\u6211\u6765\u8bd1!] Document.createTreeWalker() [\u6211\u6765\u8bd1!] Document.elementFromPoint() Document.enableStyleSheetsForSet() [\u6211\u6765\u8bd1!] document.evaluate document.execCommand Document.exitPointerLock() [\u6211\u6765\u8bd1!] Document.getBoxObjectFor() [\u6211\u6765\u8bd1!] document.getElementById Document.getElementsByClassName() Document.getElementsByName() [\u6211\u6765\u8bd1!] Document.getElementsByTagName() [\u6211\u6765\u8bd1!] Document.getElementsByTagNameNS() [\u6211\u6765\u8bd1!] document.getSelection document.hasFocus document.importNode Document.loadOverlay() [\u6211\u6765\u8bd1!] Document.mozCancelFullScreen() [\u6211\u6765\u8bd1!] Document.mozSetImageElement() [\u6211\u6765\u8bd1!] Document.open() [\u6211\u6765\u8bd1!] Document.queryCommandSupported() document.querySelector() Document.querySelectorAll Document.registerElement() [\u6211\u6765\u8bd1!] document.releaseCapture document.write document.writeln \u7ee7\u627f Node EventTarget Related pages for DOM Attr ByteString CDATASection CharacterData ChildNode Comment CustomEvent DOMConfiguration DOMError DOMErrorHandler DOMException DOMImplementation DOMImplementationList DOMImplementationRegistry DOMImplementationSource DOMLocator DOMObject DOMParser DOMPoint DOMRect DOMString DOMTimeStamp DOMTokenList DOMUserData DocumentFragment DocumentType Element ElementTraversal Entity EntityReference Event EventTarget HTMLCollection MutationObserver Node NodeFilter NodeIterator NodeList NonDocumentTypeChildNode ProcessingInstruction PromiseResolver Range Selection Text TextDecoder TextEncoder TimeRanges TreeWalker TypeInfo USVString UserDataHandler XMLDocument"}, {"id": "Syntax", "title": "\u8bed\u6cd5"}, {"id": "Examples", "title": "\u793a\u4f8b"}, {"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": "Specification", "title": "\u89c4\u8303"}], "id": 146441, "review_tags": []}