{"id":229803,"date":"2020-12-17T19:49:47","date_gmt":"2020-12-17T11:49:47","guid":{"rendered":"http:\/\/4563.org\/?p=229803"},"modified":"2020-12-17T19:49:47","modified_gmt":"2020-12-17T11:49:47","slug":"chrome-%e9%87%8c%e8%83%bd%e6%89%a7%e8%a1%8c%e7%b1%bb-jquery-%e7%9a%84%e4%b8%80%e4%ba%9b%e4%bb%a3%e7%a0%81%ef%bc%8c%e4%bd%86%e6%98%af-css-%e5%92%8c-prop-%e7%ae%97-chrome-%e7%9a%84%e8%bf%98%e6%98%af-jqu","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=229803","title":{"rendered":"chrome \u91cc\u80fd\u6267\u884c\u7c7b jquery \u7684\u4e00\u4e9b\u4ee3\u7801\uff0c\u4f46\u662f css \u548c prop \u7b97 chrome \u7684\u8fd8\u662f jquery\uff0c\u6587\u6863\u627e\u4e0d\u5230"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  chrome \u91cc\u80fd\u6267\u884c\u7c7b jquery \u7684\u4e00\u4e9b\u4ee3\u7801\uff0c\u4f46\u662f css \u548c prop \u7b97 chrome \u7684\u8fd8\u662f jquery\uff0c\u6587\u6863\u627e\u4e0d\u5230               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : NonClockworkChen <\/span>  <span><i><\/i> 4<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\">                        https:\/\/developers.google.com\/web\/tools\/chrome-devtools\/console\/utilities<\/p>\n<p>\u7c7b\u4f3c\u4ee5\u4e0b\u7684\u4ee3\u7801\u662f\u53ef\u4ee5\u76f4\u63a5\u5728 console \u4e2d\u6267\u884c\u7684\u3002<br \/>$(&#8220;input[data-name$=&#8221;+array[i]+&#8221;]&#8221;).prop(&#8220;checked&#8221;, true); <\/p>\n<p>\u6587\u6863\u4e2d\u627e\u4e0d\u5230 css \u548c prop \u65b9\u6cd5\uff0c\u6211\u4e4b\u524d\u662f\u505a\u79fb\u52a8\u7aef\u5f00\u53d1\u7684\uff0c\u4e0d\u592a\u719f\u6089 js \u3002      <\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>10<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"4713404\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : mxT52CRuqR6o5 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             document.querySelector\uff0cweb \u6807\u51c6                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4713405\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : mxT52CRuqR6o5 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u67e5\u51fa\u6765\u7684\u5c31\u662f\u4e00\u4e2a htmlelement\uff0c\u7528 web \u539f\u751f\u7684\u90a3\u4e9b\u64cd\u4f5c\u53bb\u63a7\u5236                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4713406\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : westoy <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             jquery \u7684, \u4f60\u6267\u884c console \u7684\u90a3\u9875\u5f15\u5165\u4e86 jquery \u5427                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4713407\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : NonClockworkChen <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @mxT52CRuqR6o5 \u539f\u751f\u65b9\u6cd5\u6709 css(key,value) \u548c prop(key,value)\u5417\uff0c\u6211\u89c9\u5f97\u597d\u50cf\u662f jquery \u7684\u65b9\u6cd5                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4713408\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : a62527776a <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u8fd9\u4e2a\u662f chrome \u7684\u79c1\u6709\u65b9\u6cd5                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4713409\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : NonClockworkChen <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @westoy \u6211\u505a\u4e86\u5b9e\u9a8c\uff0c\u8fd8\u771f\u662f\u56e0\u4e3a\u9875\u9762\u5f15\u7528\u4e86 jquery \u3002\u8c22\u8c22\uff0c\u5c31\u5f88\u795e\u5947\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4713410\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : ClericPy <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u8c8c\u4f3c\u662f chrome Devtools \u90a3\u4e2a console \u81ea\u5e26\u7684\u8bed\u6cd5&#8230;                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4713411\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : w292614191 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             console \u662f\u5f53\u524d\u9875\u9762\u7684\u64cd\u4f5c\uff0c\u4f60\u53ef\u4ee5\u53d6\u5f53\u524d\u9875\u9762\u7684\u503c\u3001dom \u3001\u5176\u4ed6\u4e1c\u897f\u3002<br \/>\u6bd4\u5982\u4f60\u5f53\u524d\u9875\u9762\u5f15\u5165\u4e86 jquery \u5c31\u53ef\u4ee5\u4f7f\u7528\u4e86\uff0c\u4e5f\u53ef\u4ee5\u4f7f\u7528\u539f\u751f\u7684 js \u8bed\u6cd5\u3002<br \/>\u5f53\u7136\uff0c\u8fd8\u6709\u4e00\u4e9b\u6d4f\u89c8\u5668\u81ea\u5e26\u7684\u51fd\u6570\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4713412\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Rhilip <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u6d4f\u89c8\u5668\u81ea\u5e26\u7684$\u662f\u7b97 chrome \u7684\uff0c\u4f7f\u7528\u7684\u662f document.querySelector \u3002<br \/>\u81f3\u4e8e$\u5230\u5e95\u662f chrome \u81ea\u5e26\u7684\u8fd8\u662f jQuery \u5f15\u5165\u7684\uff0c\u53ef\u4ee5\u8f93\u5165 `$.fn.jquery` \u6765\u67e5\u539f\u578b\u94fe\uff0c<br \/>\u6709\u503c\u8fd4\u56de\u4ee3\u8868$\u662f jQuery\uff0c<br \/>\u76f4\u63a5\u62a5\u9519\u8bef Uncaught TypeError: Cannot read property &#8216;fn&#8217; of undefined\uff0c \u5c31\u8bf4\u660e$\u662f chrome \u81ea\u5e26\u7684\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4713413\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : NonClockworkChen <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @Rhilip \u8c22\u8c22\uff0c\u4f60\u7684\u56de\u7b54\u8ba9\u6211\u66f4\u52a0\u6e05\u6670\u6574\u4ef6\u4e8b\u60c5\u4e86\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>chrome \u91cc\u80fd\u6267\u884c\u7c7b jque&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\/229803"}],"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=229803"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/229803\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=229803"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=229803"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=229803"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}