{"id":186027,"date":"2020-10-28T00:40:09","date_gmt":"2020-10-27T16:40:09","guid":{"rendered":"http:\/\/4563.org\/?p=186027"},"modified":"2020-10-28T00:40:09","modified_gmt":"2020-10-27T16:40:09","slug":"%e5%85%b3%e4%ba%8e-javascript-dom-%e4%b8%ad-queryselector%e6%8f%90%e5%8f%96-html-%e4%b8%ad%e7%9a%84%e4%bf%a1%e6%81%af","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=186027","title":{"rendered":"\u5173\u4e8e Javascript\/DOM \u4e2d querySelector()\u63d0\u53d6 HTML \u4e2d\u7684\u4fe1\u606f"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  \u5173\u4e8e Javascript\/DOM \u4e2d querySelector()\u63d0\u53d6 HTML \u4e2d\u7684\u4fe1\u606f               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : songdg <\/span>  <span><i><\/i> 4<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\">                        \u60f3\u77e5\u9053\u9664\u4e86 innerHTML \u548c InnerText \u4e4b\u5916\u8fd8\u6709\u6ca1\u6709\u5176\u4ed6\u65b9\u6cd5\u3002\u50cf\u7528 querySelectorAll(&#8220;td&#8221;)\u83b7\u53d6\u8fd9\u6bb5 html \u4fe1\u606f\u4e4b\u540e\uff0c\u6709\u6ca1\u6709\u65b9\u6cd5\u76f4\u63a5\u5f97\u5230\uff08&#8217;\/aic\/SearchCorporationTask?service=colligateSearchInterface&amp;sFromSupervision=fromSupSearch&amp;isUseDataCentre=true&amp;entityNo=c1788671-0169-1000-e000-b7240a0c0115&#8217;\uff09\u548c\uff08&#8217;xyz \u516c\u53f8&#8217;\uff09\u8fd9\u4e24\u6bb5\u4fe1\u606f\u3002<br \/> &lt;td&gt;&amp;nbsp;1<br \/> &lt;\/td&gt;<br \/> &lt;td&gt;&amp;nbsp;&lt;a<br \/> href=&#8221;javascript:call(&#8216;\/aic\/SearchCorporationTask?service=colligateSearchInterface&amp;sFromSupervision=fromSupSearch&amp;isUseDataCentre=true&amp;entityNo=c1788671-0169-1000-e000-b7240a0c0115&#8242;,&#8217;xyz \u516c\u53f8&#8217;)&#8221;&gt;91441900999999999z<br \/> &lt;\/a&gt;&lt;\/td&gt;<br \/> &lt;td&gt;&amp;nbsp;\u6a1f\u6751\u6559\u80b2\u8def x \u53f7 y \u5ba4<br \/> &lt;\/td&gt;      <\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>4<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"4016471\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : cyrbuzz <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4e3a\u5565\u4e0d\u8fdb\u4e00\u6b65 querySelect(&#8216;a&#8217;)\u5462&#8230;                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4016472\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : daimon1 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u7528 a.href \u83b7\u53d6\uff0c\u7136\u540e\u6b63\u5219\u63d0\u53d6\u76ee\u6807\u5b57\u7b26\u4e32\u7684\u5185\u5bb9                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4016473\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : daimon1 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             xxxx.match(\/'(.*?)&#8217;\/ig).map(str =&gt; str.substr(1, str.length &#8211; 2))                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4016474\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : mostkia <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             var str = document.querySelector(&#8216;td a&#8217;).src;<br \/>var strArr = str.split(&#8216;,&#8217;);                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>\u5173\u4e8e Javascript\/DOM&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/186027"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=186027"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/186027\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=186027"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=186027"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=186027"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}