{"id":1555,"date":"2024-11-10T09:59:55","date_gmt":"2024-11-10T01:59:55","guid":{"rendered":"https:\/\/fwq.ai\/blog\/1555\/"},"modified":"2024-11-10T09:59:55","modified_gmt":"2024-11-10T01:59:55","slug":"%e4%b8%ba%e4%bb%80%e4%b9%88%e4%bd%bf%e7%94%a8-jquery-%e5%be%aa%e7%8e%af%e8%8e%b7%e5%8f%96-tab-%e9%a1%b5%e7%ad%be%e9%95%bf%e5%ba%a6%e4%bc%9a%e5%bc%82%e5%b8%b8%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/1555\/","title":{"rendered":"\u4e3a\u4ec0\u4e48\u4f7f\u7528 jQuery \u5faa\u73af\u83b7\u53d6 Tab \u9875\u7b7e\u957f\u5ea6\u4f1a\u5f02\u5e38\uff1f"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/001\/246\/273\/173046516313409.jpg\" class=\"aligncenter\" title=\"\u4e3a\u4ec0\u4e48\u4f7f\u7528 jQuery \u5faa\u73af\u83b7\u53d6 Tab \u9875\u7b7e\u957f\u5ea6\u4f1a\u5f02\u5e38\uff1f\u63d2\u56fe\" alt=\"\u4e3a\u4ec0\u4e48\u4f7f\u7528 jQuery \u5faa\u73af\u83b7\u53d6 Tab \u9875\u7b7e\u957f\u5ea6\u4f1a\u5f02\u5e38\uff1f\u63d2\u56fe\" \/><\/p>\n<p><strong>jQuery \u5faa\u73af\u83b7\u53d6 Tab \u9875\u7b7e\u957f\u5ea6\u5f02\u5e38<\/strong><\/p>\n<p>\u5728\u4f7f\u7528 jQuery \u904d\u5386\u9875\u9762\u4e0a\u7684\u591a\u4e2a Tab \u9875\u7b7e\u65f6\uff0c\u6709\u7528\u6237\u53d1\u73b0\uff1a<\/p>\n<ul>\n<li>\u4f7f\u7528 for \u5faa\u73af\u83b7\u53d6\u5230\u7684\u957f\u5ea6\u59cb\u7ec8\u5c0f\u4e8e\u5b9e\u9645\u957f\u5ea6\u3002<\/li>\n<li>\u800c\u4f7f\u7528 $.each() \u65b9\u6cd5\u83b7\u53d6\u5230\u7684\u957f\u5ea6\u662f\u6b63\u786e\u7684\u3002<\/li>\n<\/ul>\n<p><strong>\u539f\u56e0\u5206\u6790\uff1a<\/strong><\/p>\n<p>for \u5faa\u73af\u673a\u5236\u662f\u5148\u83b7\u53d6\u5143\u7d20\uff0c\u518d\u6e32\u67d3\u9875\u9762\u3002\u800c jQuery \u7684 $&#8230;. \u56de\u8c03\u51fd\u6570\u57fa\u4e8e DOM \u6e32\u67d3\u540e\u7684\u64cd\u4f5c\u3002\u5728\u8fdb\u884c\u5faa\u73af\u65f6\uff0cDOM \u53ef\u80fd\u5c1a\u672a\u5b8c\u5168\u6e32\u67d3\uff0c\u5bfc\u81f4 for \u5faa\u73af\u65e0\u6cd5\u83b7\u53d6\u6240\u6709\u5143\u7d20\u3002<\/p>\n<p>\u603b\u7684\u6765\u8bf4\uff0c\u4f7f\u7528 jQuery \u7684 $.each() \u65b9\u6cd5\u904d\u5386 DOM \u5143\u7d20\u66f4\u53ef\u9760\uff0c\u56e0\u4e3a\u5b83\u662f\u5728 DOM \u6e32\u67d3\u5b8c\u6210\u540e\u6267\u884c\u7684\uff0c\u53ef\u4ee5\u83b7\u53d6\u6240\u6709\u5143\u7d20\u7684\u6b63\u786e\u957f\u5ea6\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u4e3a\u4ec0\u4e48\u4f7f\u7528 jQuery \u5faa\u73af\u83b7\u53d6 Tab \u9875\u7b7e\u957f\u5ea6\u4f1a\u5f02\u5e38\uff1f\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>jQuery \u5faa\u73af\u83b7\u53d6 Tab \u9875\u7b7e\u957f\u5ea6\u5f02\u5e38 \u5728\u4f7f\u7528 jQuery \u904d\u5386\u9875\u9762\u4e0a\u7684\u591a\u4e2a Tab \u9875\u7b7e\u65f6\uff0c\u6709\u7528\u6237\u53d1\u73b0\uff1a \u4f7f\u7528 for \u5faa\u73af\u83b7\u53d6\u5230\u7684\u957f\u5ea6\u59cb\u7ec8\u5c0f\u4e8e\u5b9e\u9645\u957f\u5ea6\u3002 \u800c\u4f7f\u7528 $.each() \u65b9\u6cd5\u83b7\u53d6\u5230\u7684\u957f\u5ea6\u662f\u6b63\u786e\u7684\u3002 \u539f\u56e0\u5206\u6790\uff1a for \u5faa\u73af\u673a\u5236\u662f\u5148\u83b7\u53d6\u5143\u7d20\uff0c\u518d\u6e32\u67d3\u9875\u9762\u3002\u800c jQuery \u7684 $&#8230;. \u56de\u8c03\u51fd\u6570\u57fa\u4e8e DOM \u6e32\u67d3\u540e\u7684\u64cd\u4f5c\u3002\u5728\u8fdb\u884c\u5faa\u73af\u65f6\uff0cDOM \u53ef\u80fd\u5c1a\u672a\u5b8c\u5168\u6e32\u67d3\uff0c\u5bfc\u81f4 for \u5faa\u73af\u65e0\u6cd5\u83b7\u53d6\u6240\u6709\u5143\u7d20\u3002 \u603b\u7684\u6765\u8bf4\uff0c\u4f7f\u7528 jQuery \u7684 $.each() \u65b9\u6cd5\u904d\u5386 DOM \u5143\u7d20\u66f4\u53ef\u9760\uff0c\u56e0\u4e3a\u5b83\u662f\u5728 DOM \u6e32\u67d3\u5b8c\u6210\u540e\u6267\u884c\u7684\uff0c\u53ef\u4ee5\u83b7\u53d6\u6240\u6709\u5143\u7d20\u7684\u6b63\u786e\u957f\u5ea6\u3002 \u4ee5\u4e0a\u5c31\u662f\u4e3a\u4ec0\u4e48\u4f7f\u7528 jQuery \u5faa\u73af\u83b7\u53d6 Tab \u9875\u7b7e\u957f\u5ea6\u4f1a\u5f02\u5e38\uff1f\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-1555","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/1555","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=1555"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/1555\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=1555"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=1555"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=1555"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}