Advertisement
Guest User

Untitled

a guest
Jul 28th, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.42 KB | None | 0 0
  1. <script language="JavaScript" type="text/javascript">
  2. function change()
  3.  
  4. {
  5.  
  6. var marka = document.getElementById("mark");
  7.  
  8. model = marka.value;
  9.  
  10. var layer = document.getElementById(model);
  11.  
  12. layer.style.display = "block";
  13.  
  14. }
  15.  
  16. function blank()
  17.  
  18. {
  19.  
  20. var marka = document.getElementById("mark");
  21.  
  22. model = marka.value;
  23.  
  24. var layer = document.getElementById('2');
  25.  
  26. layer.style.display = "none";
  27.  
  28. }
  29.  
  30. function ShowOr(d1) {
  31. if (d1 != '') ShowDiv(d1);
  32. };
  33.  
  34. function ShowDiv(id) {
  35. var item = null;
  36. if (document.getElementById) {
  37. item = document.getElementById(id);
  38. } else if (document.all){
  39. item = document.all[id];
  40. } else if (document.layers){
  41. item = document.layers[id];
  42. }
  43. if (!item) {
  44. }
  45. else if (item.style) {
  46. if (item.style.display == "none"){ item.style.display = ""; }
  47. else {item.style.display = ""; }
  48. }else{ item.visibility = "show"; }
  49. };
  50.  
  51. function OrHide(d1) {
  52. if (d1 != '') HideDiv(d1);
  53. };
  54.  
  55. function HideDiv(id) {
  56. var item = null;
  57. if (document.getElementById) {
  58. item = document.getElementById(id);
  59. } else if (document.all){
  60. item = document.all[id];
  61. } else if (document.layers){
  62. item = document.layers[id];
  63. }
  64. if (!item) {
  65. }
  66. else if (item.style) {
  67. if (item.style.display == "none"){ item.style.display = "none"; }
  68. else {item.style.display = "none"; }
  69. }else{ item.visibility = "show"; }
  70. };
  71.  
  72. function Vibor(kolich) {
  73. if (kolich=="1") {OrHide('pro2');OrHide('pro3'); OrHide('pro4');OrHide('pro5');OrHide('pro6');OrHide('pro7');OrHide('pro8');OrHide('pro9');OrHide('pro10'); return false;}
  74. if (kolich=="2") {ShowOr('pro2');OrHide('pro3'); OrHide('pro4');OrHide('pro5');OrHide('pro6');OrHide('pro7');OrHide('pro8');OrHide('pro9');OrHide('pro10'); return false;}
  75. if (kolich=="3") {ShowOr('pro2');ShowOr('pro3'); OrHide('pro4');OrHide('pro5');OrHide('pro6');OrHide('pro7');OrHide('pro8');OrHide('pro9');OrHide('pro10'); return false;}
  76. if (kolich=="4") {ShowOr('pro2');ShowOr('pro3'); ShowOr('pro4');OrHide('pro5');OrHide('pro6');OrHide('pro7');OrHide('pro8');OrHide('pro9');OrHide('pro10'); return false;}
  77. if (kolich=="5") {ShowOr('pro2');ShowOr('pro3'); ShowOr('pro4');ShowOr('pro5');OrHide('pro6');OrHide('pro7');OrHide('pro8');OrHide('pro9');OrHide('pro10'); return false;}
  78. if (kolich=="6") {ShowOr('pro2');ShowOr('pro3'); ShowOr('pro4');ShowOr('pro5');ShowOr('pro6');OrHide('pro7');OrHide('pro8');OrHide('pro9');OrHide('pro10'); return false;}
  79. if (kolich=="7") {ShowOr('pro2');ShowOr('pro3'); ShowOr('pro4');ShowOr('pro5');ShowOr('pro6');ShowOr('pro7');OrHide('pro8');OrHide('pro9');OrHide('pro10'); return false;}
  80. if (kolich=="8") {ShowOr('pro2');ShowOr('pro3'); ShowOr('pro4');ShowOr('pro5');ShowOr('pro6');ShowOr('pro7');ShowOr('pro8');OrHide('pro9');OrHide('pro10'); return false;}
  81. if (kolich=="9") {ShowOr('pro2');ShowOr('pro3'); ShowOr('pro4');ShowOr('pro5');ShowOr('pro6');ShowOr('pro7');ShowOr('pro8');ShowOr('pro9');OrHide('pro10'); return false;}
  82. };
  83. </script>
  84.  
  85.  
  86. Вот переключатель:
  87. <select name="kolvo" class="editor_button" onChange="Vibor(this.options[this.selectedIndex].value);">
  88. <option value="1">1</option>
  89. <option value="2">2</option>
  90. <option selected value="3">3</option>
  91. <option value="4">4</option>
  92. <option value="5">5</option>
  93. <option value="6">6</option>
  94. <option value="7">7</option>
  95. <option value="8">8</option>
  96. <option value="9">9</option>
  97. </select>
  98.  
  99.  
  100. И сами поля:
  101. <div id="pro1">
  102. <table width="98%" align="center" class="slink">
  103. <tr style="width:100%">
  104. <tr><td width="110" height="25" nowrap="nowrap">№</td><td align="center">Чемпионат</td><td align="center">Команды</td><td>Ставка</td><td>Коэф.</td></tr>
  105. <td width="110" height="25" nowrap="nowrap">1.</td>
  106. <td style="width:35%"><input type="text" name="championship1" value="" maxlength="150" class="input11" style="width:99%; height:18px; font-family:tahoma; font-size:11px; border:1px solid #909090 " /><br /></td>
  107. <td style="width:25%"><input type="text" name="game1" value="" maxlength="150" class="input11" style="width:99%; height:18px; font-family:tahoma; font-size:11px; border:1px solid #909090 " /></td>
  108. <td style="width:10%"><input type="text" name="result1" value="" maxlength="150" class="input11" style="width:99%; height:18px; font-family:tahoma; font-size:11px; border:1px solid #909090 " /></td>
  109. <td style="width:50px"><input type="text" name="k1" value="" maxlength="150" class="input11" style="width:99%; height:18px; font-family:tahoma; font-size:11px; border:1px solid #909090 " /></td>
  110. </tr>
  111. </table>
  112. </div>
  113.  
  114. <div id="pro2">
  115. <table width="98%" align="center" class="slink">
  116. <tr style="width:100%">
  117. <td width="110" height="25" nowrap="nowrap">2.</td>
  118. <td style="width:35%"><input type="text" name="championship2" value="" maxlength="150" class="input11" style="width:99%; height:18px; font-family:tahoma; font-size:11px; border:1px solid #909090 " /><br /></td>
  119. <td style="width:25%"><input type="text" name="game2" value="" maxlength="150" class="input11" style="width:99%; height:18px; font-family:tahoma; font-size:11px; border:1px solid #909090 " /></td>
  120. <td style="width:10%"><input type="text" name="result2" value="" maxlength="150" class="input11" style="width:99%; height:18px; font-family:tahoma; font-size:11px; border:1px solid #909090 " /></td>
  121. <td style="width:50px"><input type="text" name="k2" value="" maxlength="150" class="input11" style="width:99%; height:18px; font-family:tahoma; font-size:11px; border:1px solid #909090 " /></td>
  122. </tr>
  123. </table>
  124. </div>
  125.  
  126. <div id="pro3">
  127. <table width="98%" align="center" class="slink">
  128. <tr style="width:100%">
  129. <td width="110" height="25" nowrap="nowrap">3.</td>
  130. <td style="width:35%"><input type="text" name="championship3" value="" maxlength="150" class="input11" style="width:99%; height:18px; font-family:tahoma; font-size:11px; border:1px solid #909090 " /><br /></td>
  131. <td style="width:25%"><input type="text" name="game3" value="" maxlength="150" class="input11" style="width:99%; height:18px; font-family:tahoma; font-size:11px; border:1px solid #909090 " /></td>
  132. <td style="width:10%"><input type="text" name="result3" value="" maxlength="150" class="input11" style="width:99%; height:18px; font-family:tahoma; font-size:11px; border:1px solid #909090 " /></td>
  133. <td style="width:50px"><input type="text" name="k3" value="" maxlength="150" class="input11" style="width:99%; height:18px; font-family:tahoma; font-size:11px; border:1px solid #909090 " /></td>
  134. </tr>
  135. </table>
  136. </div>
  137.  
  138. <div id="pro4" style="display:none;">
  139. <table width="98%" align="center" class="slink">
  140. <tr style="width:100%">
  141. <td width="110" height="25" nowrap="nowrap">4.</td>
  142. <td style="width:35%"><input type="text" name="championship4" value="" maxlength="150" class="input11" style="width:99%; height:18px; font-family:tahoma; font-size:11px; border:1px solid #909090 " /><br /></td>
  143. <td style="width:25%"><input type="text" name="game4" value="" maxlength="150" class="input11" style="width:99%; height:18px; font-family:tahoma; font-size:11px; border:1px solid #909090 " /></td>
  144. <td style="width:10%"><input type="text" name="result4" value="" maxlength="150" class="input11" style="width:99%; height:18px; font-family:tahoma; font-size:11px; border:1px solid #909090 " /></td>
  145. <td style="width:50px"><input type="text" name="k4" value="" maxlength="150" class="input11" style="width:99%; height:18px; font-family:tahoma; font-size:11px; border:1px solid #909090 " /></td>
  146. </tr>
  147. </table>
  148. </div>
  149.  
  150. <div id="pro5" style="display:none;">
  151. <table width="98%" align="center" class="slink">
  152. <tr style="width:100%">
  153. <td width="110" height="25" nowrap="nowrap">5.</td>
  154. <td style="width:35%"><input type="text" name="championship5" value="" maxlength="150" class="input11" style="width:99%; height:18px; font-family:tahoma; font-size:11px; border:1px solid #909090 " /><br /></td>
  155. <td style="width:25%"><input type="text" name="game5" value="" maxlength="150" class="input11" style="width:99%; height:18px; font-family:tahoma; font-size:11px; border:1px solid #909090 " /></td>
  156. <td style="width:10%"><input type="text" name="result5" value="" maxlength="150" class="input11" style="width:99%; height:18px; font-family:tahoma; font-size:11px; border:1px solid #909090 " /></td>
  157. <td style="width:50px"><input type="text" name="k5" value="" maxlength="150" class="input11" style="width:99%; height:18px; font-family:tahoma; font-size:11px; border:1px solid #909090 " /></td>
  158. </tr>
  159. </table>
  160. </div>
  161.  
  162. <div id="pro6" style="display:none;">
  163. <table width="98%" align="center" class="slink">
  164. <tr style="width:100%">
  165. <td width="110" height="25" nowrap="nowrap">6.</td>
  166. <td style="width:35%"><input type="text" name="championship6" value="" maxlength="150" class="input11" style="width:99%; height:18px; font-family:tahoma; font-size:11px; border:1px solid #909090 " /><br /></td>
  167. <td style="width:25%"><input type="text" name="game6" value="" maxlength="150" class="input11" style="width:99%; height:18px; font-family:tahoma; font-size:11px; border:1px solid #909090 " /></td>
  168. <td style="width:10%"><input type="text" name="result6" value="" maxlength="150" class="input11" style="width:99%; height:18px; font-family:tahoma; font-size:11px; border:1px solid #909090 " /></td>
  169. <td style="width:50px"><input type="text" name="k6" value="" maxlength="150" class="input11" style="width:99%; height:18px; font-family:tahoma; font-size:11px; border:1px solid #909090 " /></td>
  170. </tr>
  171. </table>
  172. </div>
  173.  
  174. <div id="pro7" style="display:none;">
  175. <table width="98%" align="center" class="slink">
  176. <tr style="width:100%">
  177. <td width="110" height="25" nowrap="nowrap">7.</td>
  178. <td style="width:35%"><input type="text" name="championship7" value="" maxlength="150" class="input11" style="width:99%; height:18px; font-family:tahoma; font-size:11px; border:1px solid #909090 " /><br /></td>
  179. <td style="width:25%"><input type="text" name="game7" value="" maxlength="150" class="input11" style="width:99%; height:18px; font-family:tahoma; font-size:11px; border:1px solid #909090 " /></td>
  180. <td style="width:10%"><input type="text" name="result7" value="" maxlength="150" class="input11" style="width:99%; height:18px; font-family:tahoma; font-size:11px; border:1px solid #909090 " /></td>
  181. <td style="width:50px"><input type="text" name="k7" value="" maxlength="150" class="input11" style="width:99%; height:18px; font-family:tahoma; font-size:11px; border:1px solid #909090 " /></td>
  182. </tr>
  183. </table>
  184. </div>
  185.  
  186. <div id="pro8" style="display:none;">
  187. <table width="98%" align="center" class="slink">
  188. <tr style="width:100%">
  189. <td width="110" height="25" nowrap="nowrap">8.</td>
  190. <td style="width:35%"><input type="text" name="championship8" value="" maxlength="150" class="input11" style="width:99%; height:18px; font-family:tahoma; font-size:11px; border:1px solid #909090 " /><br /></td>
  191. <td style="width:25%"><input type="text" name="game8" value="" maxlength="150" class="input11" style="width:99%; height:18px; font-family:tahoma; font-size:11px; border:1px solid #909090 " /></td>
  192. <td style="width:10%"><input type="text" name="result8" value="" maxlength="150" class="input11" style="width:99%; height:18px; font-family:tahoma; font-size:11px; border:1px solid #909090 " /></td>
  193. <td style="width:50px"><input type="text" name="k8" value="" maxlength="150" class="input11" style="width:99%; height:18px; font-family:tahoma; font-size:11px; border:1px solid #909090 " /></td>
  194. </tr>
  195. </table>
  196. </div>
  197.  
  198. <div id="pro9" style="display:none;">
  199. <table width="98%" align="center" class="slink">
  200. <tr style="width:100%">
  201. <td width="110" height="25" nowrap="nowrap">9.</td>
  202. <td style="width:35%"><input type="text" name="championship9" value="" maxlength="150" class="input11" style="width:99%; height:18px; font-family:tahoma; font-size:11px; border:1px solid #909090 " /><br /></td>
  203. <td style="width:25%"><input type="text" name="game9" value="" maxlength="150" class="input11" style="width:99%; height:18px; font-family:tahoma; font-size:11px; border:1px solid #909090 " /></td>
  204. <td style="width:10%"><input type="text" name="result9" value="" maxlength="150" class="input11" style="width:99%; height:18px; font-family:tahoma; font-size:11px; border:1px solid #909090 " /></td>
  205. <td style="width:50px"><input type="text" name="k9" value="" maxlength="150" class="input11" style="width:99%; height:18px; font-family:tahoma; font-size:11px; border:1px solid #909090 " /></td>
  206. </tr>
  207. </table>
  208. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement