25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 
 
 
 

117 satır
5.1 KiB

  1. var m_iffc = 0;
  2. function show_info()
  3. {
  4. var cstr1 = document.getElementById('mytext').value;
  5. cstr1 = cstr1.replace(/\[T\]\[S\]/g,'\[\/T\]\[S\]');
  6. cstr1 = cstr1.replace(/\[SC\]/g,'<li class="li_21"><span class="span_1">上车</span></li>\n');
  7. cstr1 = cstr1.replace(/\[\/SC\]/g,'\n');
  8. cstr1 = cstr1.replace(/\[T\]/g,'<li class="li_3"><span class="span_2">\n');
  9. cstr1 = cstr1.replace(/\[\/T\]\[S\]/g,'&nbsp;');
  10. cstr1 = cstr1.replace(/\[\/S\]\[A\]/g,'<br/>');
  11. cstr1 = cstr1.replace(/\[\/A\]/g,'</li>\n');
  12. cstr1 = cstr1.replace(/\[X\]/g,'<li class="li_22"><span class="span_1">路程</span></li>\n<li class="li_3"><span class="span_2">');
  13. cstr1 = cstr1.replace(/\[\/X\]/g,'</span></li>\n');
  14. cstr1 = cstr1.replace(/\[J\]/g,'<li class="li_24"><span class="span_1">接驳</span></li>\n<li class="li_3"><span class="span_2">');
  15. cstr1 = cstr1.replace(/\[\/J\]/g,'</span></li>\n');
  16. cstr1 = cstr1.replace(/\[XC\]/g,'<li class="li_23"><span class="span_1">下车</span></li>\n');
  17. cstr1 = cstr1.replace(/\[\/XC\]/g,'\n');
  18. cstr1 = cstr1.replace(/\[\/S\]\[T\]/g,'</span></li>\n<li class="li_3"><span class="span_2">');
  19. cstr1 = cstr1.replace(/\[QC\]/g,'<li class="li_11">去程</li>\n');
  20. cstr1 = cstr1.replace(/\[\/QC\]/g,'\n');
  21. cstr1 = cstr1.replace(/\[FC\]/g,'<li class="li_12">返程</li>\n');
  22. cstr1 = cstr1.replace(/\[\/FC\]/g,'\n');
  23. cstr1 = cstr1.replace(/\[S\]/g,'<li class="li_3"><span class="span_2">\n');
  24. cstr1 = cstr1.replace(/\[\/S\]/g,'</span></li>\n');
  25. cstr1 = cstr1.replace(/\[D1\]/g,'');
  26. cstr1 = cstr1.replace(/\[\/D1\]/g,'');
  27. cstr1 = cstr1.replace(/\[D2\]/g,'');
  28. cstr1 = cstr1.replace(/\[\/D2\]/g,'');
  29. cstr1 = cstr1.replace(/\[D3\]/g,'');
  30. cstr1 = cstr1.replace(/\[\/D3\]/g,'');
  31. cstr1 = '<ul>' + cstr1 + '</ul>';
  32. var obj1 = document.getElementById('div_2');
  33. var obj2 = document.getElementById('mytext1');
  34. obj2.value = cstr1;
  35. obj1.innerHTML = cstr1;
  36. }
  37. function show_info1()
  38. {
  39. var cstr1 = document.getElementById('mytext').value;
  40. cstr1 = cstr1.replace(/\[T\]\[S\]/g,'\[\/T\]\[S\]');
  41. cstr1 = cstr1.replace(/\[SC\]/g,'<li class="li_21"><span class="span_1">上车</span></li>\n');
  42. cstr1 = cstr1.replace(/\[\/SC\]/g,'\n');
  43. cstr1 = cstr1.replace(/\[T\]/g,'<li class="li_3"><span class="span_2">\n');
  44. cstr1 = cstr1.replace(/\[\/T\]\[S\]/g,'&nbsp;');
  45. cstr1 = cstr1.replace(/\[\/S\]\[A\]/g,'<br/>');
  46. cstr1 = cstr1.replace(/\[\/A\]/g,'</li>\n');
  47. cstr1 = cstr1.replace(/\[X\]/g,'<li class="li_22"><span class="span_1">路程</span></li>\n<li class="li_3"><span class="span_2">');
  48. cstr1 = cstr1.replace(/\[\/X\]/g,'</span></li>\n');
  49. cstr1 = cstr1.replace(/\[J\]/g,'<li class="li_24"><span class="span_1">接驳</span></li>\n<li class="li_3"><span class="span_2">');
  50. cstr1 = cstr1.replace(/\[\/J\]/g,'</span></li>\n');
  51. cstr1 = cstr1.replace(/\[XC\]/g,'<li class="li_23"><span class="span_1">下车</span></li>\n');
  52. cstr1 = cstr1.replace(/\[\/XC\]/g,'\n');
  53. cstr1 = cstr1.replace(/\[\/S\]\[T\]/g,'</span></li>\n<li class="li_3"><span class="span_2">');
  54. cstr1 = cstr1.replace(/\[S\]/g,'<li class="li_3"><span class="span_2">\n');
  55. cstr1 = cstr1.replace(/\[\/S\]/g,'</span></li>\n');
  56. cstr1 = cstr1.replace(/\[D1\]/g,'');
  57. cstr1 = cstr1.replace(/\[\/D1\]/g,'');
  58. cstr1 = cstr1.replace(/\[D2\]/g,'');
  59. cstr1 = cstr1.replace(/\[\/D2\]/g,'');
  60. cstr1 = cstr1.replace(/\[D3\]/g,'');
  61. cstr1 = cstr1.replace(/\[\/D3\]/g,'');
  62. var num1 = cstr1.indexOf('\[QC\]');
  63. var num2 = cstr1.indexOf('\[\/QC\]');
  64. var cstr21 = '';
  65. var cstr31 = '<div id="div_qc_fc_all"><div id="div_qc_fc">';
  66. var cstr32 = '';
  67. if (num2-num1>0 && num1-0>=0)
  68. {
  69. cstr21 = cstr1.substring(num1-0+4,num2);
  70. cstr21 = '<ul>' + cstr21 + '</ul>';
  71. cstr31 += '<span id="span_qc" class="span_select" onclick="show_info2(0)">去&nbsp;程</span>';
  72. cstr32 += '<div id="div_qc">' + cstr21 + '</div>';
  73. }
  74. num1 = cstr1.indexOf('\[FC\]');
  75. num2 = cstr1.indexOf('\[\/FC\]');
  76. if (num2-num1>0 && num1-0>=0)
  77. {
  78. cstr21 = cstr1.substring(num1-0+4,num2);
  79. cstr21 = '<ul>' + cstr21 + '</ul>';
  80. cstr31 += '<span id="span_fc" class="span_unselect" onclick="show_info2(1)">返&nbsp;程</span>';
  81. cstr32 += '<div id="div_fc">' + cstr21 + '</div>';
  82. m_iffc = 1;
  83. }else{
  84. cstr32 += '<div id="div_fc"></div>';
  85. }
  86. var cstr3 = cstr31 + '</div>' + cstr32 + '</div>';
  87. var obj1 = document.getElementById('div_4');
  88. var obj2 = document.getElementById('mytext1');
  89. obj2.value = cstr3;
  90. obj1.innerHTML = cstr3;
  91. }
  92. function show_info2(myflag)
  93. {
  94. if (m_iffc - 0 == 0)
  95. {
  96. return;
  97. }else{
  98. var obj11 = document.getElementById('span_qc');
  99. var obj12 = document.getElementById('div_qc');
  100. var obj21 = document.getElementById('span_fc');
  101. var obj22 = document.getElementById('div_fc');
  102. if (myflag - 1 == 0)
  103. {
  104. obj11.className = 'span_unselect';
  105. obj21.className = 'span_select';
  106. obj12.style.display = 'none';
  107. obj22.style.display = 'block';
  108. }else{
  109. obj11.className = 'span_select';
  110. obj21.className = 'span_unselect';
  111. obj12.style.display = 'block';
  112. obj22.style.display = 'none';
  113. }
  114. }
  115. }