{"id":1853,"date":"2021-05-24T16:36:58","date_gmt":"2021-05-24T16:36:58","guid":{"rendered":"https:\/\/lvboard.infostore.in.ua\/?page_id=1853"},"modified":"2021-05-24T16:36:58","modified_gmt":"2021-05-24T16:36:58","slug":"dom","status":"publish","type":"page","link":"https:\/\/lvboard.infostore.in.ua\/?page_id=1853","title":{"rendered":"DOM"},"content":{"rendered":"\n<p><strong>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432<\/strong><\/p>\n\n\n\n<p>document.createElement(tag) &#8211; \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0441 \u0442\u0435\u0433\u043e\u043c tag<br>document.createTextNode(txt) &#8211; \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0439 \u0443\u0437\u0435\u043b \u0441 \u0442\u0435\u043a\u0441\u0442\u043e\u043c txt<br>node.cloneNode(deep) &#8211; \u043a\u043b\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u0443\u0437\u0435\u043b, \u0435\u0441\u043b\u0438 deep=true \u0442\u043e \u0441 \u043f\u043e\u0434\u0443\u0437\u043b\u0430\u043c\u0438.<\/p>\n\n\n\n<p><strong>\u0421\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0443\u0437\u043b\u043e\u0432<\/strong><\/p>\n\n\n\n<p>node.nodeType &#8211; \u0442\u0438\u043f \u0443\u0437\u043b\u0430: 1(\u044d\u043b\u0435\u043c\u0435\u043d\u0442) \/ 3(\u0442\u0435\u043a\u0441\u0442) \/ \u0434\u0440\u0443\u0433\u0438\u0435.<br>elem.tagName &#8211; \u0442\u0435\u0433 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430.<br>elem.innerHTML &#8211; HTML \u0432\u043d\u0443\u0442\u0440\u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430.<br><a href=\"http:\/\/node.data\/\" target=\"_blank\" rel=\"noreferrer noopener\">node.data<\/a>&nbsp;&#8211; \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043b\u044e\u0431\u043e\u0433\u043e \u0443\u0437\u043b\u0430 \u043b\u044e\u0431\u043e\u0433\u043e \u0442\u0438\u043f\u0430, \u043a\u0440\u043e\u043c\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430.<\/p>\n\n\n\n<p><strong>\u0421\u0441\u044b\u043b\u043a\u0438<\/strong><\/p>\n\n\n\n<p>document.documentElement&nbsp;&#8211; \u044d\u043b\u0435\u043c\u0435\u043d\u0442 &lt;HTML&gt;<br>document.body&nbsp;&#8211; \u044d\u043b\u0435\u043c\u0435\u043d\u0442 &lt;BODY&gt;<\/p>\n\n\n\n<p><strong>\u041f\u043e \u0432\u0441\u0435\u043c \u0443\u0437\u043b\u0430\u043c:<\/strong><\/p>\n\n\n\n<p>parentNode<br>nextSibling previousSibling<br>childNodes firstChild lastChild<\/p>\n\n\n\n<p><strong>\u0422\u043e\u043b\u044c\u043a\u043e \u043f\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c:<\/strong><\/p>\n\n\n\n<p>\u0414\u0435\u0442\u0438: children (\u0412 IE 8- \u0442\u0430\u043a\u0436\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438)<br>\u0421\u043e\u0441\u0435\u0434\u0438, \u043a\u0440\u043e\u043c\u0435 IE8-: nextElementSibling previousElementSibling<br>\u0414\u0435\u0442\u0438, \u043a\u0440\u043e\u043c\u0435 IE8-: firstElementChild lastElementChild<\/p>\n\n\n\n<p><strong>\u0422\u0430\u0431\u043b\u0438\u0446\u044b<\/strong><\/p>\n\n\n\n<p>table.rows[N]&nbsp;&#8211; \u0441\u0442\u0440\u043e\u043a\u0430 TR \u043d\u043e\u043c\u0435\u0440 N.<br>tr.cells[N]&nbsp;&#8211; \u044f\u0447\u0435\u0439\u043a\u0430 TH\/TD \u043d\u043e\u043c\u0435\u0440 N.<br>tr.sectionRowIndex&nbsp;&#8211; \u043d\u043e\u043c\u0435\u0440 \u0441\u0442\u0440\u043e\u043a\u0438 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u0432 \u0441\u0435\u043a\u0446\u0438\u0438 THEAD\/TBODY.<br>td.cellIndex&nbsp;&#8211; \u043d\u043e\u043c\u0435\u0440 \u044f\u0447\u0435\u0439\u043a\u0438 \u0432 \u0441\u0442\u0440\u043e\u043a\u0435.<\/p>\n\n\n\n<p><strong>\u0424\u043e\u0440\u043c\u044b<\/strong><\/p>\n\n\n\n<p>document.forms[N\/name]&nbsp;&#8211; \u0444\u043e\u0440\u043c\u0430 \u043f\u043e \u043d\u043e\u043c\u0435\u0440\u0443\/\u0438\u043c\u0435\u043d\u0438.<br>form.elements[N\/name]&nbsp;&#8211; \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0444\u043e\u0440\u043c\u044b \u043f\u043e \u043d\u043e\u043c\u0435\u0440\u0443\/\u0438\u043c\u0435\u043d\u0438<br>element.form&nbsp;&#8211; \u0444\u043e\u0440\u043c\u0430 \u0434\u043b\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 document.createElement(tag) &#8211; \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0441 \u0442\u0435\u0433\u043e\u043c tagdocument.createTextNode(txt) &#8211; \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0439 \u0443\u0437\u0435\u043b \u0441 \u0442\u0435\u043a\u0441\u0442\u043e\u043c txtnode.cloneNode(deep) &#8211; \u043a\u043b\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u0443\u0437\u0435\u043b, \u0435\u0441\u043b\u0438 deep=true \u0442\u043e \u0441 \u043f\u043e\u0434\u0443\u0437\u043b\u0430\u043c\u0438. \u0421\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0443\u0437\u043b\u043e\u0432 node.nodeType &#8211; \u0442\u0438\u043f \u0443\u0437\u043b\u0430: 1(\u044d\u043b\u0435\u043c\u0435\u043d\u0442) \/ 3(\u0442\u0435\u043a\u0441\u0442) \/ \u0434\u0440\u0443\u0433\u0438\u0435.elem.tagName &#8211; \u0442\u0435\u0433 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430.elem.innerHTML &#8211; HTML \u0432\u043d\u0443\u0442\u0440\u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430.node.data&nbsp;&#8211; \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043b\u044e\u0431\u043e\u0433\u043e \u0443\u0437\u043b\u0430 \u043b\u044e\u0431\u043e\u0433\u043e \u0442\u0438\u043f\u0430, \u043a\u0440\u043e\u043c\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430. \u0421\u0441\u044b\u043b\u043a\u0438 document.documentElement&nbsp;&#8211; \u044d\u043b\u0435\u043c\u0435\u043d\u0442 &lt;HTML&gt;document.body&nbsp;&#8211; \u044d\u043b\u0435\u043c\u0435\u043d\u0442 &hellip; <a href=\"https:\/\/lvboard.infostore.in.ua\/?page_id=1853\" class=\"more-link\">\u041f\u0440\u043e\u0434\u043e\u0432\u0436\u0438\u0442\u0438 \u0447\u0438\u0442\u0430\u043d\u043d\u044f<span class=\"screen-reader-text\"> &#8220;DOM&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":[],"_links":{"self":[{"href":"https:\/\/lvboard.infostore.in.ua\/index.php?rest_route=\/wp\/v2\/pages\/1853"}],"collection":[{"href":"https:\/\/lvboard.infostore.in.ua\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/lvboard.infostore.in.ua\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/lvboard.infostore.in.ua\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lvboard.infostore.in.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1853"}],"version-history":[{"count":1,"href":"https:\/\/lvboard.infostore.in.ua\/index.php?rest_route=\/wp\/v2\/pages\/1853\/revisions"}],"predecessor-version":[{"id":1854,"href":"https:\/\/lvboard.infostore.in.ua\/index.php?rest_route=\/wp\/v2\/pages\/1853\/revisions\/1854"}],"wp:attachment":[{"href":"https:\/\/lvboard.infostore.in.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1853"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}