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.
 
 
 
 

752 lines
21 KiB

  1. function getweek (){
  2. var week = "week=";
  3. for(var i = 1;i<$(".weeklist input").length;i++){
  4. if($(".weeklist input").eq(i).is(":checked")){week+=i}
  5. }
  6. return week
  7. }
  8. function getalltime(){
  9. var allstation = "allstation=";
  10. for(var i = 0;i<$(".replace-lineinfo tr").length;i++){
  11. if(i==$(".replace-lineinfo tr").length-1){var lian = ""}else{var lian = "&"}
  12. var astation = ["'"];
  13. var atime = parseInt($(".replace-lineinfo tr").eq(i).children("td:eq(0)").children(".hour").val())*60+parseInt($(".replace-lineinfo tr").eq(i).children("td:eq(0)").children(".minute").val());
  14. var astationid = $(".replace-lineinfo tr").eq(i).children("td:eq(1)").attr("alineid");
  15. var aupdowntype = $(".replace-lineinfo tr").eq(i).children("td:eq(2)").children("select").val();
  16. var amouth = $(".replace-lineinfo tr").eq(i).children("td:eq(3)").children("select").val();
  17. astation.push("atime:",atime,",");
  18. astation.push("astationid:",astationid,",");
  19. astation.push("aupdowntype:",aupdowntype,",");
  20. astation.push("amouth:",amouth,"'",lian)
  21. allstation+=astation.join("")
  22. }
  23. return allstation
  24. }
  25. function getallcar(){
  26. var allcar = "allcar=";
  27. for(var i = 0;i<$(".car-select").length;i++){
  28. if(i==$(".car-select").length-1){var lian = ""}else{var lian = "&"}
  29. var acar = ["'"];
  30. var acartype = $(".car-select").children(".car-item").val();
  31. var acarnum = $(".car-select").children("input").val();
  32. var acarseat = $(".car-select").children(".ifseat").val();
  33. acar.push("acartypeid:",acartype,",");
  34. acar.push("acarnum:",acarnum,",");
  35. acar.push("acarseat:",acarseat,"'",lian);
  36. allcar+=acar.join("");
  37. }
  38. return allcar
  39. }
  40. function gettickettype(){
  41. var allticket = "allticket="
  42. for(var i = 0;i<$(".ticket_sel").length;i++){
  43. if($(".ticket_sel").eq(i).is(":checked")){
  44. var aticket=["'"];
  45. var aticketid = $(".ticket_sel").eq(i).val();
  46. var aticketnum = $(".ticket_sel").eq(i).parent().parent().children("td:eq(5)").children("input").val();
  47. aticket.push("aticketid:",aticketid,",");
  48. aticket.push("aticketnum:",aticketnum,"'","&");
  49. allticket+=aticket.join("");
  50. }
  51. }
  52. allticket= allticket.substring(0,allticket.length-1);
  53. return allticket
  54. }
  55. function sellday(){}
  56. $(document).ready(function(){
  57. var ticket1 = $(".adult").outerHTML();
  58. $(".adult").remove();
  59. var ticket2 = $(".noble").outerHTML();
  60. var addcar = $(".car-select").outerHTML();
  61. $(".car-select").remove();
  62. console.log($(".add-line").length)
  63. $(".storage").on("click",function(){
  64. var lineid = getval(".add-line","lineid");
  65. var startime = getval(".startime","val");
  66. var endtime = getval(".endtime","val");
  67. var week = getweek ();
  68. var alltime = getalltime();
  69. var allcar = getallcar();
  70. var allticket=gettickettype();
  71. var sellday = getval(".sellday","val")
  72. var all = getdata(lineid,startime,endtime,week,alltime,allcar,allticket,sellday)
  73. console.log(all)
  74. })
  75. $('.add-line').on('keyup',function(ev){
  76. var val = this.value;
  77. if(/[a-zA-Z]+/.test(val)){
  78. $.getJSON("json/"+val+".html?rand="+Math.random(),function(data){
  79. var html = [];
  80. $.each(data,function(i,v){
  81. html.push('<li lineid='+v.lineid+'>'+v.name+'</li>')
  82. });
  83. //console.log(this)
  84. $(".line-item").html(html.join(""));
  85. $(".line-item>li").on("click",function(){
  86. var val = $(this).html().replace(/[^a-zA-Z]+/,'');
  87. $('.add-line').val($(this).html()).attr("lineid",$(this).attr("lineid"));
  88. // console.log($(this).attr("dataid"))
  89. $(".line-item").html("");
  90. // $.getJSON('json/'+val+'.html?rand='+Math.random(),function(data){
  91. // var linehtml = [];
  92. // //console.log(1);
  93. // //console.log(lineInfoFormat);
  94. // var tickethtml = [];
  95. // $.each(data,function(i,v){
  96. // // console.log(v.lineId);
  97. // if(typeof v.lineId=="undefined"){
  98. // var td1= addTd(addTime(v.time));
  99. // var td2= addTd(v.site);
  100. // if(i==0){var td3= addTd('<select disabled><option>上</option></select>')}
  101. // else{var td3=addTd(addUpdownType(v.type))};
  102. // var td4 = addTd(addMouth(v.maxcheck,v.check));
  103. // linehtml.push(addItem("tr","aline",td1.concat(td2,td3,td4)))
  104. // }else{
  105. // var line = v.line.split("-"),
  106. // ticket11= ticket1.replace("出发地",line[0]).replace("目的地",line[1]),
  107. // ticket22 = ticket2,
  108. // arr = [],
  109. // ticket=null,
  110. // judge=false;
  111. // $.each(v,function(key,value){
  112. // if(key=="child"){
  113. // var child=["child","","儿童"];
  114. // Array.prototype.push.apply(child,value.split(","));
  115. // arr.push(child);
  116. // };
  117. // if(key=="noble"){
  118. // var noble=["noble","贵宾","成人"];
  119. // Array.prototype.push.apply(noble,value.split(","));
  120. // arr.push(noble);
  121. // };
  122. // if(key=="adult"){
  123. // var adult=["adult","普通","成人"];
  124. // Array.prototype.push.apply(adult,value.split(","));
  125. // arr.push(adult);
  126. // };
  127. // });
  128. // //var myticket1 = ticket1.replace("出发地",line[0]).replace("目的地",line[1]);
  129. // for(var i = 0;i<arr.length;i++){
  130. // if(judge==false){
  131. // //myticket1.replace("座位",arr[i][0]).replace("人群",arr[i][1]).replace("零售价",arr[i][2].replace("ticketnum",arr[]))
  132. // ticket = ticket11.replace(/座位|人群|零售价|ticketnum|ticketval/g,function(match){
  133. // switch(match){
  134. // case "座位":
  135. // return arr[i][1];
  136. // case "人群":
  137. // return arr[i][2];
  138. // case "零售价":
  139. // return arr[i][3];
  140. // case "ticketnum":
  141. // return arr[i][4];
  142. // case "ticketval":
  143. // return arr[i][0]
  144. // }
  145. // })
  146. // judge=true;
  147. // tickethtml.push(addTr(ticket));
  148. // }
  149. // else{
  150. // ticket=ticket2.replace(/座位|人群|零售价|ticketnum|ticketval/g,function(match){
  151. // switch(match){
  152. // case "座位":
  153. // return arr[i][1];
  154. // case "人群":
  155. // return arr[i][2];
  156. // case "零售价":
  157. // return arr[i][3];
  158. // case "ticketnum":
  159. // return arr[i][4];
  160. // case "ticketval":
  161. // return arr[i][0]
  162. // }
  163. // })
  164. // tickethtml.push(addTr(ticket))
  165. // }
  166. // }
  167. // $(".able-ticket").html(addTr(tickethtml.join("")))
  168. // }
  169. // })
  170. // $(".replace-lineinfo").html(linehtml);
  171. // var hourinfo = [];
  172. // $.each($('.hour'),function(i,v){
  173. // var val = $('.hour').eq(i).val()
  174. // var arr = [i,val]
  175. // hourinfo.push(arr)
  176. // })
  177. // var minuteinfo = [];
  178. // $.each($('.minute'),function(i,v){
  179. // var val = $('.minute').eq(i).val()
  180. // var arr = [i,val]
  181. // minuteinfo.push(arr)
  182. // })
  183. // $(".hour").on("change",function(){
  184. // var index = $(this).parent().parent().index();
  185. // var max = $(".hour").length;
  186. // var dangvalue = $(this).val();
  187. // for(var i = 0;i<hourinfo.length;i++){
  188. // if(index == hourinfo[i][0]){//获得下标
  189. // var nextindex = hourinfo[i][0]+1;
  190. // var myaddvalue = dangvalue-hourinfo[i][1];
  191. // if(myaddvalue<0){
  192. // hourinfo[i][1]=myaddvalue;
  193. // }else{
  194. // for(var t = nextindex;t<max;t++){
  195. // var myvalue = hourinfo[t][1];//获得下一个input值
  196. // var addvalue = myaddvalue+parseInt(myvalue);
  197. // if(addvalue>23){addvalue-=24}{
  198. // $(".hour").eq(t).find("option").removeAttr("selected");$(".hour").eq(t).find("option").eq(addvalue).attr("selected","true")
  199. // hourinfo[t][1]=addvalue;
  200. // }
  201. // }
  202. // }
  203. // }
  204. // }
  205. // hourinfo[index][1]=dangvalue;
  206. // })
  207. // $(".minute").on("change",function(){
  208. // var index = $(this).parent().parent().index();
  209. // var max = $(".minute").length;
  210. // var dangvalue = parseInt($(this).val());
  211. // for(var i = 0;i<minuteinfo.length;i++){
  212. // if(index == minuteinfo[i][0]){//获得下标
  213. // var nextindex = parseInt(minuteinfo[i][0])+1;
  214. // var addnum = dangvalue-parseInt(minuteinfo[i][1]);
  215. // if(addnum<0){minuteinfo[i][1]=addnum}
  216. // else{
  217. // for(var t = nextindex;t<max;t++){
  218. // var myhourvalue = hourinfo[t][1];
  219. // var myminutevalue = minuteinfo[t][1];
  220. // var addvalue = addnum+parseInt(myminutevalue);
  221. // if(addvalue>=60){addvalue-=60; var addhour = parseInt(hourinfo[t][1])+1;}
  222. // if(typeof addhour=="undefined"){
  223. // $(".minute").eq(t).find("option").removeAttr("selected");$(".minute").eq(t).find("option").eq(addvalue).attr("selected","true")
  224. // minuteinfo[t][1]=addvalue;
  225. // }else{
  226. // $(".minute").eq(t).find("option").removeAttr("selected");$(".minute").eq(t).find("option").eq(addvalue).attr("selected","true")
  227. // minuteinfo[t][1]=addvalue;
  228. // $(".hour").eq(t).find("option").removeAttr("selected");$(".hour").eq(t).find("option").eq(addhour).attr("selected","true");
  229. // hourinfo[t][1]=addhour;
  230. // }
  231. // }
  232. // }
  233. // }
  234. // }
  235. // minuteinfo[index][1]=dangvalue;
  236. // })
  237. // })
  238. $.getJSON('json/'+val+'.html?rand='+Math.random(),function(data){
  239. var linehtml = [];
  240. //console.log(1);
  241. //console.log(lineInfoFormat);
  242. var tickethtml = [];
  243. $(".add-cartype").on("click",function(){
  244. var cartype = [];
  245. $.each(data.addcartype,function(i,v){
  246. var acar = additemall("option",v.cartype,{"value":v.id})
  247. cartype.push(acar)
  248. })
  249. var acartype = addcar.replace("cartype",cartype.join());
  250. $(".car-type").append(acartype);
  251. $(".car-select .del").unbind();
  252. $(".car-select .del").on("click",function(){
  253. $(this).parent().remove();
  254. });
  255. })
  256. $.each(data.station,function(i,v){
  257. var td1= addTd(addTime(v.DATE_TIME));
  258. var td2= additemall("td",v.SITES,{alineid:v.RES_ID});
  259. //
  260. //console.log(td2)
  261. if(i==0){var td3= addTd('<select disabled><option value="108">上</option></select>')}
  262. else{var td3=addTd(addUpdownType(v.UP_DOWN_TYPE))};
  263. var td4 = addTd(addMouth(v.TICKET_GATE,v.CHECKPORT));
  264. linehtml.push(addItem("tr","aline",td1.concat(td2,td3,td4)))
  265. })
  266. $.each(data.ticket,function(i,v){
  267. //var html = [];
  268. if(i==0){
  269. var atciket = ticket1.replace(/START_AREA|END_AREA|SEAT|CROWD|PRICE|MAX_COUNT|PROD_ID/g,function(match){
  270. switch(match){
  271. case "START_AREA":
  272. return v.START_AREA;
  273. case "END_AREA":
  274. return v.END_AREA;
  275. case "SEAT":
  276. return v.SEAT;
  277. case "CROWD":
  278. return v.CROWD;
  279. case "MAX_COUNT":
  280. return v.MAX_COUNT;
  281. case "PROD_ID":
  282. return v.PROD_ID;
  283. case "PRICE":
  284. return v.PRICE;
  285. }
  286. })
  287. tickethtml.push(atciket)
  288. //console.log(html)
  289. }else{
  290. var atciket = ticket1.replace(/START_AREA|END_AREA|SEAT|CROWD|PRICE|MAX_COUNT|PROD_ID/g,function(match){
  291. switch(match){
  292. case "START_AREA":
  293. return "";
  294. case "END_AREA":
  295. return "";
  296. case "SEAT":
  297. return v.SEAT;
  298. case "CROWD":
  299. return v.CROWD;
  300. case "MAX_COUNT":
  301. return v.MAX_COUNT;
  302. case "PROD_ID":
  303. return v.PROD_ID;
  304. case "PRICE":
  305. return v.PRICE;
  306. }
  307. })
  308. tickethtml.push(atciket)
  309. }
  310. })
  311. $(".replace-lineinfo").html(linehtml).attr("lineid",data.station[1].PROD_ID);
  312. //console.log(tickethtml)
  313. //console.log(ticket1)
  314. $(".able-ticket").html(tickethtml.join())
  315. var hourinfo = [];
  316. $.each($('.hour'),function(i,v){
  317. var val = $('.hour').eq(i).val()
  318. var arr = [i,val]
  319. hourinfo.push(arr)
  320. })
  321. var minuteinfo = [];
  322. $.each($('.minute'),function(i,v){
  323. var val = $('.minute').eq(i).val()
  324. var arr = [i,val]
  325. minuteinfo.push(arr)
  326. })
  327. $(".hour").on("change",function(){
  328. var index = $(this).parent().parent().index();
  329. var max = $(".hour").length;
  330. var dangvalue = $(this).val();
  331. for(var i = 0;i<hourinfo.length;i++){
  332. if(index == hourinfo[i][0]){//获得下标
  333. var nextindex = hourinfo[i][0]+1;
  334. var myaddvalue = dangvalue-hourinfo[i][1];
  335. if(myaddvalue<0){
  336. hourinfo[i][1]=myaddvalue;
  337. }else{
  338. for(var t = nextindex;t<max;t++){
  339. var myvalue = hourinfo[t][1];//获得下一个input值
  340. var addvalue = myaddvalue+parseInt(myvalue);
  341. if(addvalue>23){addvalue-=24}{
  342. $(".hour").eq(t).find("option").removeAttr("selected");$(".hour").eq(t).find("option").eq(addvalue).attr("selected","true")
  343. hourinfo[t][1]=addvalue;
  344. }
  345. }
  346. }
  347. }
  348. }
  349. hourinfo[index][1]=dangvalue;
  350. })
  351. $(".minute").on("change",function(){
  352. var index = $(this).parent().parent().index();
  353. var max = $(".minute").length;
  354. var dangvalue = parseInt($(this).val());
  355. for(var i = 0;i<minuteinfo.length;i++){
  356. if(index == minuteinfo[i][0]){//获得下标
  357. var nextindex = parseInt(minuteinfo[i][0])+1;
  358. var addnum = dangvalue-parseInt(minuteinfo[i][1]);
  359. if(addnum<0){minuteinfo[i][1]=addnum}
  360. else{
  361. for(var t = nextindex;t<max;t++){
  362. var myhourvalue = hourinfo[t][1];
  363. var myminutevalue = minuteinfo[t][1];
  364. var addvalue = addnum+parseInt(myminutevalue);
  365. if(addvalue>=60){addvalue-=60; var addhour = parseInt(hourinfo[t][1])+1;}
  366. if(typeof addhour=="undefined"){
  367. $(".minute").eq(t).find("option").removeAttr("selected");$(".minute").eq(t).find("option").eq(addvalue).attr("selected","true")
  368. minuteinfo[t][1]=addvalue;
  369. }else{
  370. $(".minute").eq(t).find("option").removeAttr("selected");$(".minute").eq(t).find("option").eq(addvalue).attr("selected","true")
  371. minuteinfo[t][1]=addvalue;
  372. $(".hour").eq(t).find("option").removeAttr("selected");$(".hour").eq(t).find("option").eq(addhour).attr("selected","true");
  373. hourinfo[t][1]=addhour;
  374. }
  375. }
  376. }
  377. }
  378. }
  379. minuteinfo[index][1]=dangvalue;
  380. })
  381. })
  382. })
  383. })
  384. }
  385. });
  386. // $(".add-cartype").on("click",function(){
  387. // $.getJSON("json/cartype.html?rand="+Math.random(),function(data){
  388. // var car = [];
  389. // $.each(data,function(i,v){
  390. // car.push('<option value='+v.id+'>'+v.cartype+'</option>');
  391. // });
  392. // car = addItem('select','car-item',car.join(""));
  393. // var carnumoption = [];
  394. // for(var i = 1;i<=data[0].count;i++){
  395. // carnumoption.push('<option value='+i+'>'+i+'</option>')
  396. // }
  397. // var carnum = addItem('select','car-num',carnumoption.join(""));
  398. // var ifseat = [];
  399. // if(data[0].ifSeat==0){
  400. // ifseat.push('<option value="sel">可选</option><option value="nosel">不可选</option>');
  401. // }else if(data[0].ifSeat==1){
  402. // ifseat.push('<option value="sel">可选</option>');
  403. // }else if(data[0].ifSeat==2){
  404. // ifseat.push('<option value="nosel">不可选</option>');
  405. // }
  406. // ifseat=addItem("select","ifseat",ifseat.join(""))
  407. // var del = addItem('span','del','删除')
  408. // var all = car.concat(carnum,ifseat,del);
  409. // var div = addItem('div','car-select',all);
  410. // $(".car-type").append(div);
  411. // $(".del").on("click",function(){
  412. // $(this).parent().remove();
  413. // })
  414. // $(".car-item").on("change",function(){
  415. // var count = null;
  416. // var ifseat = null;
  417. // var val = this.value;
  418. // $.each(data,function(i,v){
  419. // if(val==v.id){
  420. // count=v.count;
  421. // ifseat=v.ifSeat
  422. // }
  423. // });
  424. // var selnum = [];
  425. // for(var i = 1;i<=count;i++){
  426. // selnum.push('<option>'+i+'</option>')
  427. // }
  428. // $(this).parent().find(".car-num").html(selnum.join("")).removeAttr("disabled");
  429. // if(ifseat==0){
  430. // $(this).parent().find(".if-seat").html('<option value="sel">可选</option><option value="nosel">不可选</option>').removeAttr("disabled");
  431. // }
  432. // else if(ifseat==1){
  433. // $(this).parent().find(".if-seat").html('<option value="sel">可选</option>').removeAttr("disabled");
  434. // }
  435. // else if(ifseat==1){
  436. // $(this).parent().find(".if-seat").html('<option value="nosel">不可选</option>').removeAttr("disabled");
  437. // }
  438. // })
  439. // })
  440. // })
  441. $('.date-picker').datepicker({autoclose:true}).next().on('click', function(){
  442. $(this).prev().focus();
  443. });
  444. $('.allweek').on('change',function(){
  445. if($(this).is(":checked")){
  446. for(var i=0;i<$(".week").length;i++){
  447. $(".week").eq(i).click()
  448. }
  449. }else{
  450. for(var i=0;i<$(".week").length;i++){
  451. $(".week").eq(i).removeAttr("checked");
  452. }
  453. }
  454. })
  455. $(".storage").on("click",function(){
  456. var lineid = 'lineid='+$(".add-line").attr('dataid');
  457. var time = 'time='+$("#id-date-picker-1").val()+'-'+$("#id-date-picker-2").val();
  458. var pass = [];
  459. (function(){
  460. var line =[];
  461. for(var i = 0;i<$(".aline").length;i++){
  462. var aline = [];
  463. aline.push("time="+$(".aline").eq(i).find(".hour").val()+":"+$(".aline").eq(i).find(".minute").val());
  464. aline.push("site="+$(".aline").find("td").eq(1).html());
  465. aline.push("updown="+$(".aline").find(".updown").val());
  466. aline.push("mouth="+$(".aline").find(".mouth").val());
  467. line.push(aline.join(""));
  468. }
  469. })()
  470. url = 'lineid='+$(".add-line").attr('dataid')+'time='+$("#id-date-picker-1").val()+'-'+$("#id-date-picker-2").val()
  471. })
  472. })
  473. function addItem(label,classname,cent){
  474. var html = ['<'+label+' class='+classname+'>'];
  475. html.push(cent);
  476. html.push('</'+label+'>');
  477. return html.join("")
  478. }
  479. function addLi(html){
  480. var li = ['<li>'];
  481. li.push(html);
  482. li.push('</li>');
  483. li = li.join("");
  484. return li
  485. }
  486. function addTime(time){
  487. var time = time.split(":");
  488. var newHour = parseInt(time[0]),
  489. newMinute = parseInt(time[1]);
  490. var html = ['<select class="hour">'];
  491. for(var i=0;i<24;i++){
  492. if(i==newHour){
  493. html.push('<option selected value='+i+'>'+i+'</option>')}
  494. else{html.push('<option value='+i+'>'+i+'</option>')}
  495. }
  496. html.push('</select>:<select class="minute">')
  497. for(var t=0;t<60;t++){
  498. if(t==newMinute){
  499. html.push('<option selected value='+t+'>'+t+'</option>')
  500. }else{
  501. html.push('<option value='+t+'>'+t+'</option>')
  502. }
  503. }
  504. html.push('</select>');
  505. html = html.join("")
  506. return html
  507. }
  508. function addUpdownType(type){
  509. var typeid= null;
  510. var alltypeid = [108,109,110,114]
  511. if(type==108){typeid="上"}
  512. else if(type==109){typeid="上下"}
  513. else if(type==110){typeid="下"}
  514. else if(type==114){typeid="不停"}
  515. var html = ['<select class="updown">'],
  516. alltype = ['上','下','上下','不停']
  517. for(var i = 0;i<4;i++){
  518. if(typeid==alltype[i]){html.push('<option selected value='+alltypeid[i]+'>'+alltype[i]+'</option>')}
  519. else{html.push('<option value = '+alltypeid[i]+'>'+alltype[i]+'</option>')}
  520. }
  521. html.push('</select>');
  522. html = html.join("")
  523. return html
  524. }
  525. function addMouth(maxNum,num){
  526. var html = ['<select class="mouth">'];
  527. console.log(maxNum);
  528. console.log(num)
  529. for(var i in maxNum){
  530. if(i==num){
  531. html.push('<option selected value = '+i+'>'+maxNum[i]+'</option>')
  532. }else{
  533. html.push('<option value='+i+'>'+maxNum[i]+'</option>')
  534. }
  535. };
  536. html.push("</select>");
  537. html = html.join("")
  538. return html;
  539. }
  540. function addTd(html){
  541. var td = ['<td>'];
  542. td.push(html);
  543. td.push('</td>');
  544. td = td.join("")
  545. return td;
  546. }
  547. function addTr(html){
  548. var tr = ['<tr>'];
  549. tr.push(html)
  550. tr.push('</tr>');
  551. tr = tr.join("")
  552. return tr;
  553. }
  554. jQuery.fn.outerHTML = function(s) {
  555. return (s) ? this.before(s).remove() : $("<Hill_man>").append(this.eq(0).clone()).html();
  556. }
  557. function additemall(lable,cen,attr){
  558. var html = ['<'+lable+ ' ' + (function(attr){if(typeof(attr)=="undefined"){return ""}else{var arr=[];for(i in attr){arr.push(i+'="'+attr[i]+'"')};return arr.join(" ")}})(attr) +'>'];
  559. html.push(cen);
  560. html.push('</'+lable+'>');
  561. // console.log(html)
  562. return html.join("")
  563. }
  564. function getdata(){
  565. var val = [];
  566. Array.prototype.push.apply(val,arguments);
  567. return val.join(";");
  568. }
  569. function getval(dom,value){
  570. var val = null;
  571. if(value=="val"||value=="value"){val =$(dom).eq(0).val()}
  572. else if(value == "html"){val = $(dom).eq(0).html()}
  573. else {val = $(dom).eq(0).attr(value);var name = value;return name + "=" +val;}
  574. var name = $(dom).eq(0).attr("name");
  575. return name + "=" +val
  576. }