搜尋此網誌

2018-09-19

萊爾富店到店寄件單改直式

此代碼可以將萊爾富寄件單橫式改為直式
javascript:var tw="350";function rewrite(){for(k=(taghr=document.getElementsByTagName("hr")).length-1;k>=0;k--){taghr[k].parentNode.removeChild(taghr[k])}for(i=0;i<=(Maintable=document.getElementsByClassName("gridtable")).length-1;i++){Maintable[i].setAttribute("Style","border-width: medium; border-style: groove;display:inline-block;");var tr0="<tr><td valign='top' align='center'>"+Maintable[i].childNodes[1].childNodes[0].children[0].innerHTML+"</td></tr>";var tr1="<tr><td valign='top' align='center'>"+Maintable[i].childNodes[1].childNodes[0].children[1].innerHTML+"</td></tr>";var tr2="<tr><td valign='top' align='center'>"+Maintable[i].childNodes[1].childNodes[0].children[2].innerHTML+"</td></tr>";Maintable[i].getElementsByTagName("tbody")[0].innerHTML=tr0+tr1+tr2;Maintable[i].getElementsByTagName("table")[3].innerHTML="";Maintable[i].getElementsByTagName("table")[3].setAttribute("width",tw);Maintable[i].getElementsByTagName("td")[0].insertBefore(document.createElement("hr"),Maintable[i].getElementsByTagName("table")[1]);Maintable[i].getElementsByTagName("tr")[4].innerHTML="";Maintable[i].getElementsByTagName("tr")[15].innerHTML="";Maintable[i].getElementsByTagName("tr")[17].innerHTML="";Maintable[i].getElementsByTagName("td")[1].innerHTML=Maintable[i].getElementsByTagName("td")[27].innerHTML;Maintable[i].getElementsByTagName("td")[27].innerHTML="";for(j=0;j<=(x=document.getElementsByTagName("td")).length-1;j++){x[j].setAttribute("align","center")}}}void (rewrite());

沒有留言:

張貼留言