|
- var m_iffc = 0;
- function show_info()
- {
- var cstr1 = document.getElementById('mytext').value;
-
- cstr1 = cstr1.replace(/\[T\]\[S\]/g,'\[\/T\]\[S\]');
- cstr1 = cstr1.replace(/\[SC\]/g,'<li class="li_21"><span class="span_1">上车</span></li>\n');
- cstr1 = cstr1.replace(/\[\/SC\]/g,'\n');
- cstr1 = cstr1.replace(/\[T\]/g,'<li class="li_3"><span class="span_2">\n');
- cstr1 = cstr1.replace(/\[\/T\]\[S\]/g,' ');
- cstr1 = cstr1.replace(/\[\/S\]\[A\]/g,'<br/>');
- cstr1 = cstr1.replace(/\[\/A\]/g,'</li>\n');
- cstr1 = cstr1.replace(/\[X\]/g,'<li class="li_22"><span class="span_1">路程</span></li>\n<li class="li_3"><span class="span_2">');
- cstr1 = cstr1.replace(/\[\/X\]/g,'</span></li>\n');
- cstr1 = cstr1.replace(/\[J\]/g,'<li class="li_24"><span class="span_1">接驳</span></li>\n<li class="li_3"><span class="span_2">');
- cstr1 = cstr1.replace(/\[\/J\]/g,'</span></li>\n');
- cstr1 = cstr1.replace(/\[XC\]/g,'<li class="li_23"><span class="span_1">下车</span></li>\n');
- cstr1 = cstr1.replace(/\[\/XC\]/g,'\n');
- cstr1 = cstr1.replace(/\[\/S\]\[T\]/g,'</span></li>\n<li class="li_3"><span class="span_2">');
- cstr1 = cstr1.replace(/\[QC\]/g,'<li class="li_11">去程</li>\n');
- cstr1 = cstr1.replace(/\[\/QC\]/g,'\n');
- cstr1 = cstr1.replace(/\[FC\]/g,'<li class="li_12">返程</li>\n');
- cstr1 = cstr1.replace(/\[\/FC\]/g,'\n');
- cstr1 = cstr1.replace(/\[S\]/g,'<li class="li_3"><span class="span_2">\n');
- cstr1 = cstr1.replace(/\[\/S\]/g,'</span></li>\n');
- cstr1 = cstr1.replace(/\[D1\]/g,'');
- cstr1 = cstr1.replace(/\[\/D1\]/g,'');
- cstr1 = cstr1.replace(/\[D2\]/g,'');
- cstr1 = cstr1.replace(/\[\/D2\]/g,'');
- cstr1 = cstr1.replace(/\[D3\]/g,'');
- cstr1 = cstr1.replace(/\[\/D3\]/g,'');
- cstr1 = '<ul>' + cstr1 + '</ul>';
- var obj1 = document.getElementById('div_2');
- var obj2 = document.getElementById('mytext1');
- obj2.value = cstr1;
- obj1.innerHTML = cstr1;
- }
- function show_info1()
- {
- var cstr1 = document.getElementById('mytext').value;
- cstr1 = cstr1.replace(/\[T\]\[S\]/g,'\[\/T\]\[S\]');
- cstr1 = cstr1.replace(/\[SC\]/g,'<li class="li_21"><span class="span_1">上车</span></li>\n');
- cstr1 = cstr1.replace(/\[\/SC\]/g,'\n');
- cstr1 = cstr1.replace(/\[T\]/g,'<li class="li_3"><span class="span_2">\n');
- cstr1 = cstr1.replace(/\[\/T\]\[S\]/g,' ');
- cstr1 = cstr1.replace(/\[\/S\]\[A\]/g,'<br/>');
- cstr1 = cstr1.replace(/\[\/A\]/g,'</li>\n');
- cstr1 = cstr1.replace(/\[X\]/g,'<li class="li_22"><span class="span_1">路程</span></li>\n<li class="li_3"><span class="span_2">');
- cstr1 = cstr1.replace(/\[\/X\]/g,'</span></li>\n');
- cstr1 = cstr1.replace(/\[J\]/g,'<li class="li_24"><span class="span_1">接驳</span></li>\n<li class="li_3"><span class="span_2">');
- cstr1 = cstr1.replace(/\[\/J\]/g,'</span></li>\n');
- cstr1 = cstr1.replace(/\[XC\]/g,'<li class="li_23"><span class="span_1">下车</span></li>\n');
- cstr1 = cstr1.replace(/\[\/XC\]/g,'\n');
- cstr1 = cstr1.replace(/\[\/S\]\[T\]/g,'</span></li>\n<li class="li_3"><span class="span_2">');
- cstr1 = cstr1.replace(/\[S\]/g,'<li class="li_3"><span class="span_2">\n');
- cstr1 = cstr1.replace(/\[\/S\]/g,'</span></li>\n');
- cstr1 = cstr1.replace(/\[D1\]/g,'');
- cstr1 = cstr1.replace(/\[\/D1\]/g,'');
- cstr1 = cstr1.replace(/\[D2\]/g,'');
- cstr1 = cstr1.replace(/\[\/D2\]/g,'');
- cstr1 = cstr1.replace(/\[D3\]/g,'');
- cstr1 = cstr1.replace(/\[\/D3\]/g,'');
-
- var num1 = cstr1.indexOf('\[QC\]');
- var num2 = cstr1.indexOf('\[\/QC\]');
- var cstr21 = '';
- var cstr31 = '<div id="div_qc_fc_all"><div id="div_qc_fc">';
- var cstr32 = '';
- if (num2-num1>0 && num1-0>=0)
- {
- cstr21 = cstr1.substring(num1-0+4,num2);
- cstr21 = '<ul>' + cstr21 + '</ul>';
- cstr31 += '<span id="span_qc" class="span_select" onclick="show_info2(0)">去 程</span>';
- cstr32 += '<div id="div_qc">' + cstr21 + '</div>';
- }
- num1 = cstr1.indexOf('\[FC\]');
- num2 = cstr1.indexOf('\[\/FC\]');
- if (num2-num1>0 && num1-0>=0)
- {
- cstr21 = cstr1.substring(num1-0+4,num2);
- cstr21 = '<ul>' + cstr21 + '</ul>';
- cstr31 += '<span id="span_fc" class="span_unselect" onclick="show_info2(1)">返 程</span>';
- cstr32 += '<div id="div_fc">' + cstr21 + '</div>';
- m_iffc = 1;
- }else{
- cstr32 += '<div id="div_fc"></div>';
- }
- var cstr3 = cstr31 + '</div>' + cstr32 + '</div>';
- var obj1 = document.getElementById('div_4');
- var obj2 = document.getElementById('mytext1');
- obj2.value = cstr3;
- obj1.innerHTML = cstr3;
- }
- function show_info2(myflag)
- {
- if (m_iffc - 0 == 0)
- {
- return;
- }else{
- var obj11 = document.getElementById('span_qc');
- var obj12 = document.getElementById('div_qc');
- var obj21 = document.getElementById('span_fc');
- var obj22 = document.getElementById('div_fc');
- if (myflag - 1 == 0)
- {
- obj11.className = 'span_unselect';
- obj21.className = 'span_select';
- obj12.style.display = 'none';
- obj22.style.display = 'block';
- }else{
- obj11.className = 'span_select';
- obj21.className = 'span_unselect';
- obj12.style.display = 'block';
- obj22.style.display = 'none';
- }
- }
- }
|