Нема описа
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. (function(){
  2. var menu = document.getElementById('tab_menu1');
  3. var content = document.getElementById('tab_content1');
  4. var menus = menu.getElementsByTagName('span');
  5. var current; // 現在の状態を保持する変数
  6. for (var i = 0, l = menus.length;i < l; i++){
  7. tab_init(menus[i], i);
  8. }
  9. function tab_init(link, index){
  10. var id = link.className;
  11. var page = document.getElementById(id);
  12. if (!current){ // 状態の初期化
  13. current = {page:page, menu:link};
  14. page.style.display = 'block';
  15. link.className = 'active';
  16. } else {
  17. page.style.display = 'none';
  18. }
  19. link.onclick = function(){
  20. current.page.style.display = 'none';
  21. current.menu.className = '';
  22. page.style.display = 'block';
  23. link.className = 'active';
  24. current.page = page;
  25. current.menu = link;
  26. return false;
  27. };
  28. }
  29. })();
  30. (function(){
  31. var menu = document.getElementById('tab_menu2');
  32. var content = document.getElementById('tab_content2');
  33. var menus = menu.getElementsByTagName('span');
  34. var current; // 現在の状態を保持する変数
  35. for (var i = 0, l = menus.length;i < l; i++){
  36. tab_init(menus[i], i);
  37. }
  38. function tab_init(link, index){
  39. var id = link.className;
  40. var page = document.getElementById(id);
  41. if (!current){ // 状態の初期化
  42. current = {page:page, menu:link};
  43. page.style.display = 'block';
  44. link.className = 'active';
  45. } else {
  46. page.style.display = 'none';
  47. }
  48. link.onclick = function(){
  49. current.page.style.display = 'none';
  50. current.menu.className = '';
  51. page.style.display = 'block';
  52. link.className = 'active';
  53. current.page = page;
  54. current.menu = link;
  55. return false;
  56. };
  57. }
  58. })();
  59. (function(){
  60. var menu = document.getElementById('tab_menu3');
  61. var content = document.getElementById('tab_content3');
  62. var menus = menu.getElementsByTagName('span');
  63. var current; // 現在の状態を保持する変数
  64. for (var i = 0, l = menus.length;i < l; i++){
  65. tab_init(menus[i], i);
  66. }
  67. function tab_init(link, index){
  68. var id = link.className;
  69. var page = document.getElementById(id);
  70. if (!current){ // 状態の初期化
  71. current = {page:page, menu:link};
  72. page.style.display = 'block';
  73. link.className = 'active';
  74. } else {
  75. page.style.display = 'none';
  76. }
  77. link.onclick = function(){
  78. current.page.style.display = 'none';
  79. current.menu.className = '';
  80. page.style.display = 'block';
  81. link.className = 'active';
  82. current.page = page;
  83. current.menu = link;
  84. return false;
  85. };
  86. }
  87. })();