﻿{"id":1196,"date":"2010-08-01T09:45:54","date_gmt":"2010-08-01T01:45:54","guid":{"rendered":"http:\/\/blog.jixin.ntxz.net\/?p=1196"},"modified":"2010-08-01T09:45:54","modified_gmt":"2010-08-01T01:45:54","slug":"%e5%85%b3%e4%ba%8etab%e9%80%89%e9%a1%b9%e5%8d%a1%e7%9a%84%e4%b8%80%e4%ba%9b%e5%ae%9e%e7%8e%b0%e6%96%b9%e5%bc%8f-2","status":"publish","type":"post","link":"http:\/\/www.ntxz.net\/?p=1196","title":{"rendered":"\u5173\u4e8eTab(\u9009\u9879\u5361)\u7684\u4e00\u4e9b\u5b9e\u73b0\u65b9\u5f0f"},"content":{"rendered":"<p>\u5bf9\u4e8e\u8fd9\u4e2a\u529f\u80fd\uff0c\u6211\u60f3\u5927\u5bb6\u90fd\u4e0d\u964c\u751f\u3002\u6700\u521d\u662f\u5728zEUS\u7684DZTHEME\u4e0a\u89c1\u5230,\u540e\u6765\u6162\u6162\u7684\u5f88\u591a\u4eba\u90fd\u5f00\u59cb\u559c\u6b22\u8fd9\u79cd\u505a\u6cd5\uff0c\u56e0\u4e3a\u8fd9\u6837\u505a\u6709\u5f88\u591a\u597d\u5904\uff0c\u6700\u660e\u663e\u7684\u5c31\u662f\u5728\u6709\u9650\u7684\u5730\u65b9\u653e\u66f4\u591a\u7684\u5185\u5bb9\u3002\u5f53\u7136\u8fd9\u4e0d\u662f\u6211\u4eca\u5929\u8981\u8bf4\u7684\u4e3b\u8981\u5185\u5bb9\uff0c\u4eca\u5929\u8c08\u7684\u662f\u600e\u4e48\u5b9e\u73b0\uff0c\u54ea\u79cd\u5b9e\u73b0\u65b9\u5f0f\u66f4\u597d\u3002<\/p>\n<p>\u5176\u5b9e\u6700\u8fd1\u770b\u4e86\u5f88\u591a\u5173\u4e8eTABS\u7684\u6587\u7ae0\uff0c\u5927\u5bb6\u7684\u5b9e\u73b0\u65b9\u5f0f\u90fd\u4e0d\u4e00\u6837\uff0c\u4f46\u6548\u679c\u662f\u4e00\u6837\uff0c\u4eca\u5929\u53c8\u5728\u57ce\u8baa@\u540e\u4e0a\u770b\u5230\u4e86\u4ed6\u7684\u201d\u4e3a\u4f60\u7684\u535a\u5ba2\u8f7b\u677e\u6dfb\u52a0Tabs\u9009\u9879\u5361\u5207\u6362\u6548\u679c\u201c\uff0c\u6240\u4ee5\u624d\u60f3\u5199\u8fd9\u7bc7\u6587\u7ae0\u7684\u3002<\/p>\n<p>\u6211\u4eec\u73b0\u5728\u770b\u4e0b\u6548\u679c\u56fe\u3002<br \/>\n<a href=\"http:\/\/blog.jixin.ntxz.net\/wp-content\/uploads\/2010\/08\/sidebar.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/blog.jixin.ntxz.net\/wp-content\/uploads\/2010\/08\/sidebar-242x300.jpg\" alt=\"\" title=\"sidebar\" width=\"242\" height=\"300\" class=\"alignnone size-medium wp-image-1197\" srcset=\"http:\/\/www.ntxz.net\/wp-content\/uploads\/2010\/08\/sidebar-242x300.jpg 242w, http:\/\/www.ntxz.net\/wp-content\/uploads\/2010\/08\/sidebar.jpg 249w\" sizes=\"auto, (max-width: 242px) 100vw, 242px\" \/><\/a><br \/>\n\u73b0\u5728\u6211\u4eec\u6765\u4e00\u6b65\u4e00\u6b65\u5b9e\u73b0\u5b83\u3002\u9996\u5148\u6211\u4eec\u770b\u4e0bJavaScript\u4ee3\u7801:<br \/>\n<coolcode><br \/>\nfunction setTab(name,cursel,n){<br \/>\nfor(i=1;i<=n;i++){\nvar menu=document.getElementById(name+i);\nvar con=document.getElementById(\"con_\"+name+\"_\"+i);\nmenu.className=i==cursel?\"current_sidebar\":\"\";\ncon.style.display=i==cursel?\"block\":\"none\";\n}\n}\n<\/coolcode><br \/>\n\u4e00\u6bb5\u5f88\u7b80\u5355\u7684\u4ee3\u7801\uff0c\u6ce8\u91ca\u6211\u5c31\u4e0d\u5199\u4e86\uff0c\u4f46\u529f\u80fd\u53bb\u5f88\u5f3a\u5927\u3002\u53ef\u4ee5\u5f88\u65b9\u4fbf\u7684\u6dfb\u52a0\u591a\u4e2aTAB\uff0c\u53ea\u9700\u4fee\u6539ID\u540d\u5c31\u884c\u3002<br \/>\n\u6211\u4eec\u770b\u4e0b\u5b9e\u9645\uff1a<br \/>\n<coolcode><\/p>\n<div class=\"Menubox\">\n<ul>\n<li id=\"one1\" onmouseover=\"setTab('one',1,3)\">Tab1<\/li>\n<li id=\"one2\" class=\"hover\" onmouseover=\"setTab('one',2,3)\">Tab2<\/li>\n<li id=\"one3\" onmouseover=\"setTab('one',3,3)\">Tab3<\/li>\n<\/ul>\n<div class=\"Contentbox\">\n<div id=\"con_one_1\">\u65b0\u95fb\u5217\u88681<\/div>\n<div id=\"con_one_2\" style=\"display:none\">\u65b0\u95fb\u5217\u88682<\/div>\n<div id=\"con_one_3\" style=\"display:none\">\u65b0\u95fb\u5217\u88683<\/div>\n<\/div>\n<\/div>\n<p><\/coolcode><br \/>\n\u5982\u679c\u6211\u4eec\u8981\u6dfb\u52a0\u591a\u4e2a\uff0c\u53ea\u9700\u8981\u628a\u4e0a\u9762\u7684one1\u6539\u6210two1,con_one_1\u6539\u6210con_two_1\u5c31\u884c\u4e86\uff0c\u8fd9\u6837\u5c31\u80fd\u5f88\u65b9\u4fbf\u7684<br \/>\n\u4e3a\u4f60\u7684\u9875\u9762\u6dfb\u52a0\u591a\u4e2aTAB\uff0c\u5c31\u50cf\u6211\u7684\u4fa7\u8fb9\u680f\u3002<\/p>\n<p>\u597d\u4e86\uff0c\u6700\u540e\u6211\u4eec\u6765\u770b\u4e0b\u8fd0\u884c\u6548\u679c\u3002<\/p>\n<div class=\"runcode\">\n<p><textarea name=\"runcode\" style=\"overflow-y:visible;width:600px;font-size:12px\" class=\"runcode_text\" id=\"runcode_rXxK0U\">\r\n&lt;!DOCTYPE html PUBLIC &quot;-\/\/W3C\/\/DTD XHTML 1.0 Transitional\/\/EN&quot; &gt;\r\n&lt;html xmlns=&quot;http:\/\/www.w3.org\/1999\/xhtml&quot;&gt;\r\n&lt;head&gt;\r\n&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text\/html;charset=gb2312&quot; \/&gt;\r\n&lt;title&gt;\u7b80\u6d01Tab&lt;\/title&gt;\r\n&lt;style type=&quot;text\/css&quot;&gt;\r\n&lt;!--\r\nbody,div,ul,li{\r\n padding:0;\r\n text-align:center;\r\n}\r\nbody{\r\n font:12px &quot;\u5b8b\u4f53&quot;;\r\n text-align:center;\r\n}\r\na:link{\r\n color:#00F;\r\n text-decoration:none;\r\n}\r\na:visited {\r\n color: #00F;\r\n text-decoration:none;\r\n}\r\na:hover {\r\n color: #c00;\r\n text-decoration:underline;\r\n}\r\nul{ list-style:none;}\r\n\/*\u83dc\u5355class*\/\r\n.Menubox {\r\nwidth:50%;\r\nbackground:url(http:\/\/www.hxcgw.com\/bbs\/upfile\/20079299441652.gif);\r\nheight:28px;\r\nline-height:28px;\r\n}\r\n.Menubox ul{\r\nmargin:0px;\r\npadding:0px;\r\n}\r\n.Menubox li{\r\n float:left;\r\n display:block;\r\n cursor:pointer;\r\n width:114px;\r\n text-align:center;\r\n color:#949694;\r\n font-weight:bold;\r\n }\r\n.Menubox li.hover{\r\n padding:0px;\r\n background:#fff;\r\n width:116px;\r\n border-left:1px solid #A8C29F;\r\n border-top:1px solid #A8C29F;\r\n border-right:1px solid #A8C29F;\r\nbackground:url(http:\/\/www.hxcgw.com\/bbs\/upfile\/200792994426548.gif);\r\n color:#739242;\r\n font-weight:bold;\r\n height:27px;\r\nline-height:27px;\r\n}\r\n.Contentbox{\r\nwidth: 50%;\r\n clear:both;\r\n margin-top:0px;\r\n border:1px solid #A8C29F;\r\n border-top:none;\r\n height:181px;\r\n text-align:center;\r\n padding-top:8px;\r\n}\r\n--&gt;\r\n&lt;\/style&gt;\r\n&lt;script&gt;\r\n&lt;!--\r\nfunction setTab(name,cursel,n){\r\n for(i=1;i&lt;=n;i++){\r\n  var menu=document.getElementById(name+i);\r\n  var con=document.getElementById(&quot;con_&quot;+name+&quot;_&quot;+i);\r\n  menu.className=i==cursel?&quot;hover&quot;:&quot;&quot;;\r\n  con.style.display=i==cursel?&quot;block&quot;:&quot;none&quot;;\r\n }\r\n}\r\n\/\/--&gt;\r\n&lt;\/script&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n&lt;br&gt;&lt;br&gt;\r\n&lt;div class=&quot;Menubox&quot;&gt;\r\n&lt;ul&gt;\r\n   &lt;li id=&quot;one1&quot; onmouseover=&quot;setTab('one',1,4)&quot;  &gt;\u65b0\u95fb1&lt;\/li&gt;\r\n   &lt;li id=&quot;one2&quot; onmouseover=&quot;setTab('one',2,4)&quot; class=&quot;hover&quot;&gt;\u65b0\u95fb2&lt;\/li&gt;\r\n   &lt;li id=&quot;one3&quot; onmouseover=&quot;setTab('one',3,4)&quot;&gt;\u65b0\u95fb3&lt;\/li&gt;\r\n   &lt;li id=&quot;one4&quot; onmouseover=&quot;setTab('one',4,4)&quot;&gt;\u65b0\u95fb4&lt;\/li&gt;\r\n&lt;\/ul&gt;\r\n&lt;\/div&gt;\r\n &lt;div class=&quot;Contentbox&quot;&gt;\r\n   &lt;div id=&quot;con_one_1&quot; &gt;\u65b0\u95fb\u5217\u88681&lt;\/div&gt;\r\n   &lt;div id=&quot;con_one_2&quot; style=&quot;display:none&quot;&gt;\u65b0\u95fb\u5217\u88682&lt;\/div&gt;\r\n   &lt;div id=&quot;con_one_3&quot; style=&quot;display:none&quot;&gt;\u65b0\u95fb\u5217\u88683&lt;\/div&gt;\r\n   &lt;div id=&quot;con_one_4&quot; style=&quot;display:none&quot;&gt;\u65b0\u95fb\u5217\u88684&lt;\/div&gt;\r\n &lt;\/div&gt;\r\n&lt;br \/&gt;\r\n&lt;div class=&quot;Menubox&quot;&gt;\r\n&lt;ul&gt;\r\n   &lt;li id=&quot;two1&quot; onClick=&quot;setTab('two',1,4)&quot;  class=&quot;hover&quot;&gt;\u65b0\u95fb1&lt;\/li&gt;\r\n   &lt;li id=&quot;two2&quot; onClick=&quot;setTab('two',2,4)&quot; &gt;\u65b0\u95fb2&lt;\/li&gt;\r\n   &lt;li id=&quot;two3&quot; onClick=&quot;setTab('two',3,4)&quot;&gt;\u65b0\u95fb3&lt;\/li&gt;\r\n   &lt;li id=&quot;two4&quot; onClick=&quot;setTab('two',4,4)&quot;&gt;\u65b0\u95fb4&lt;\/li&gt;\r\n&lt;\/ul&gt;\r\n&lt;\/div&gt;\r\n &lt;div class=&quot;Contentbox&quot;&gt;\r\n   &lt;div id=&quot;con_two_1&quot; &gt;\u65b0\u95fb\u5217\u88681&lt;\/div&gt;\r\n   &lt;div id=&quot;con_two_2&quot; style=&quot;display:none&quot;&gt;\u65b0\u95fb\u5217\u88682&lt;\/div&gt;\r\n   &lt;div id=&quot;con_two_3&quot; style=&quot;display:none&quot;&gt;\u65b0\u95fb\u5217\u88683&lt;\/div&gt;\r\n   &lt;div id=&quot;con_two_4&quot; style=&quot;display:none&quot;&gt;\u65b0\u95fb\u5217\u88684&lt;\/div&gt;\r\n &lt;\/div&gt;\r\n&lt;br \/&gt;\r\n &lt;div class=&quot;Menubox&quot;&gt;\r\n&lt;ul&gt;\r\n   &lt;li id=&quot;three1&quot; onClick=&quot;setTab('three',1,3)&quot;  class=&quot;hover&quot;&gt;\u65b0\u95fb1&lt;\/li&gt;\r\n   &lt;li id=&quot;three2&quot; onClick=&quot;setTab('three',2,3)&quot; &gt;\u65b0\u95fb2&lt;\/li&gt;\r\n   &lt;li id=&quot;three3&quot; onClick=&quot;setTab('three',3,3)&quot;&gt;\u65b0\u95fb3&lt;\/li&gt;\r\n&lt;\/ul&gt;\r\n&lt;\/div&gt;\r\n &lt;div class=&quot;Contentbox&quot;&gt;\r\n   &lt;div id=&quot;con_three_1&quot; &gt;\u65b0\u95fb\u5217\u88681&lt;\/div&gt;\r\n   &lt;div id=&quot;con_three_2&quot; style=&quot;display:none&quot;&gt;\u65b0\u95fb\u5217\u88682&lt;\/div&gt;\r\n   &lt;div id=&quot;con_three_3&quot; style=&quot;display:none&quot;&gt;\u65b0\u95fb\u5217\u88683&lt;\/div&gt;\r\n &lt;\/div&gt;\r\n &lt;br \/&gt;\r\n  &lt;div class=&quot;Menubox&quot;&gt;\r\n&lt;ul&gt;\r\n   &lt;li id=&quot;four1&quot; onClick=&quot;setTab('four',1,3)&quot;  class=&quot;hover&quot;&gt;\u65b0\u95fb1&lt;\/li&gt;\r\n   &lt;li id=&quot;four2&quot; onClick=&quot;setTab('four',2,3)&quot; &gt;\u65b0\u95fb2&lt;\/li&gt;\r\n   &lt;li id=&quot;four3&quot; onClick=&quot;setTab('four',3,3)&quot;&gt;\u65b0\u95fb3&lt;\/li&gt;\r\n&lt;\/ul&gt;\r\n&lt;\/div&gt;\r\n &lt;div class=&quot;Contentbox&quot;&gt;\r\n   &lt;div id=&quot;con_four_1&quot; &gt;\u65b0\u95fb\u5217\u88681&lt;\/div&gt;\r\n   &lt;div id=&quot;con_four_2&quot; style=&quot;display:none&quot;&gt;\u65b0\u95fb\u5217\u88682&lt;\/div&gt;\r\n   &lt;div id=&quot;con_four_3&quot; style=&quot;display:none&quot;&gt;\u65b0\u95fb\u5217\u88683&lt;\/div&gt;\r\n &lt;\/div&gt;\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;\r\n<\/textarea><\/p>\n<script type=\"text\/javascript\">function changeTsize(){document.getElementById(\"runcode_rXxK0U\").style.height = document.getElementById(\"runcode_rXxK0U\").scrollHeight + \"px\";}window.setTimeout(changeTsize,0);<\/script><p><input type=\"button\" value=\"\u8fd0\u884c\" class=\"runcode_button\" onclick=\"runcode_open_new('runcode_rXxK0U');\"\/> <input type=\"button\" value=\"\u590d\u5236\" class=\"runcode_button\" onclick=\"runcode_copy('runcode_rXxK0U');\"\/> <input type=\"button\" value=\"\u53e6\u5b58\u4ee3\u7801\" class=\"runcode_button\" onclick=\"saveCode('runcode_rXxK0U','runcode_rXxK0U');\"\/> \u63d0\u793a\uff1a\u4f60\u53ef\u4ee5\u5148\u4fee\u6539\u90e8\u5206\u4ee3\u7801\u518d\u8fd0\u884c\u3002<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u5bf9\u4e8e\u8fd9\u4e2a\u529f\u80fd\uff0c\u6211\u60f3\u5927\u5bb6\u90fd\u4e0d\u964c\u751f\u3002\u6700\u521d\u662f\u5728zEUS\u7684DZTHEME\u4e0a\u89c1\u5230,\u540e\u6765\u6162\u6162\u7684\u5f88\u591a\u4eba\u90fd\u5f00\u59cb\u559c\u6b22\u8fd9\u79cd\u505a\u6cd5\uff0c\u56e0 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[41],"tags":[36,42],"class_list":["post-1196","post","type-post","status-publish","format-standard","hentry","category-jquery-2","tag-jquery","tag-tab"],"views":839,"_links":{"self":[{"href":"http:\/\/www.ntxz.net\/index.php?rest_route=\/wp\/v2\/posts\/1196","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.ntxz.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.ntxz.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.ntxz.net\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.ntxz.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1196"}],"version-history":[{"count":1,"href":"http:\/\/www.ntxz.net\/index.php?rest_route=\/wp\/v2\/posts\/1196\/revisions"}],"predecessor-version":[{"id":1198,"href":"http:\/\/www.ntxz.net\/index.php?rest_route=\/wp\/v2\/posts\/1196\/revisions\/1198"}],"wp:attachment":[{"href":"http:\/\/www.ntxz.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1196"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.ntxz.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1196"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.ntxz.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1196"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}