js+css实现动态删除表格行、列、双击编辑

Java代码   收藏代码
  1. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">  
  2. <title>动态删除表格</title>  
  3. <style>  
  4. body{  
  5.     FONT-SIZE: 9pt; PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; PADDING-TOP: 0px;  
  6. }  
  7. input {  
  8.     FONT-SIZE: 9pt; height: 15pt; width:50px; cursor: default;  
  9. }  
  10. table{  
  11.     font-size: 9pt;  
  12.     word-break:break-all;  
  13.     cursor: default;  
  14.     BORDER: black 1px solid;  
  15.     background-color:#eeeecc;  
  16.     border-collapse:collapse;  
  17.     border-Color:#999999;  
  18.     align:center;  
  19. }  
  20. </style>  
  21. <script language="JavaScript">  
  22. var Main_Tab= null;  
  23. var cur_row = null;  
  24. var cur_col = null;  
  25. var cur_cell    = null;  
  26. var Org_con = "";  
  27. var sort_col    = null;  
  28.   
  29. var show_col    = false;  
  30. var charMode= true;  
  31. var act_bgc = "#BEC5DE";  
  32. var act_fc  = "black";  
  33. var cur_bgc = "#ccffcc";  
  34. var cur_fc  = "black";  
  35.   
  36. function init(){  
  37.     cur_row= null;  
  38.     cur_col= null;  
  39.     cur_cell= null;  
  40.     sort_col= null;  
  41.     Main_Tab = PowerTable;  
  42.     read_def(Main_Tab)  
  43.     Main_Tab.οnmοuseοver= overIt;  
  44.     Main_Tab.οnmοuseοut= outIt;  
  45.     Main_Tab.οnclick= clickIt;  
  46.     Main_Tab.οndblclick= dblclickIt;  
  47.     Org_con= Main_Tab.outerHTML;  
  48.     arrowUp = document.createElement("SPAN");  
  49.     arrowUp.innerHTML= "5";  
  50.     arrowUp.style.cssText = "PADDING-RIGHT: 0px; MARGIN-TOP: -3px; PADDING-LEFT: 0px; FONT-SIZE: 10px; MARGIN-BOTTOM: 2px; PADDING-BOTTOM: 2px; OVERFLOW: hidden; WIDTH: 10px; COLOR: blue; PADDING-TOP: 0px; FONT-FAMILY: webdings; HEIGHT: 11px";  
  51.     arrowDown = document.createElement("SPAN");  
  52.     arrowDown.innerHTML = "6";  
  53.     arrowDown.style.cssText = "PADDING-RIGHT: 0px; MARGIN-TOP: -3px; PADDING-LEFT: 0px; FONT-SIZE: 10px; MARGIN-BOTTOM: 2px; PADDING-BOTTOM: 2px; OVERFLOW: hidden; WIDTH: 10px; COLOR: blue; PADDING-TOP: 0px; FONT-FAMILY: webdings; HEIGHT: 11px";  
  54. }  
  55. function window.onload(){  
  56.     init();  
  57.     /*www.codefans.net*/  
  58.     drag = document.createElement("DIV");  
  59.     drag.innerHTML= "";  
  60.     drag.style.textAlign    = "center";  
  61.     drag.style.position     = "absolute";  
  62.     drag.style.cursor   = "hand";  
  63.     drag.style.border   = "1 solid black";  
  64.     drag.style.display  = "none";  
  65.     drag.style.zIndex   = "999";  
  66.       
  67.     document.body.insertBefore(drag);  
  68.     setInterval("judge_move()",100);  
  69.     setInterval("showContent.value=Main_Tab.innerHTML;monitor.value='cur_row: '+cur_row+'; cur_col: '+cur_col + '; sort_col: ' +sort_col",1000);  
  70. }  
  71.   
  72. function judge_move(){  
  73.     move[0].disabled=(cur_row == null || cur_row<=1);  
  74.     move[1].disabled=(cur_row == null || cur_row==Main_Tab.rows.length-1 || cur_row == 0);  
  75.     move[2].disabled=(cur_col == null || cur_col==0);  
  76.     move[3].disabled=(cur_col == null || cur_col==Main_Tab.rows[0].cells.length-1);  
  77. }  
  78.   
  79. document.onselectstart  = function(){return false;}  
  80. document.onmouseup  = drag_end;  
  81. function clear_color(){  
  82.     the_table=Main_Tab;  
  83.     if(cur_col!=null){  
  84.         for(i=0;i<the_table.rows.length;i++){  
  85.             with(the_table.rows[i].cells[cur_col]){  
  86.                 style.backgroundColor=oBgc;  
  87.                 style.color=oFc;  
  88.             }  
  89.         }  
  90.     }  
  91.     if(cur_row!=null){  
  92.         for(i=0;i<the_table.rows[cur_row].cells.length;i++){  
  93.             with(the_table.rows[cur_row].cells[i]){  
  94.                 style.backgroundColor=oBgc;  
  95.                 style.color=oFc;  
  96.             }  
  97.         }  
  98.     }  
  99.     if(cur_cell!=null){  
  100.         cur_cell.children[0].contentEditable = false;  
  101.         with(cur_cell.children[0].runtimeStyle){  
  102.             borderLeft=borderTop="";  
  103.             borderRight=borderBottom="";  
  104.             backgroundColor="";  
  105.             paddingLeft="";  
  106.             textAlign="";  
  107.         }  
  108.     }  
  109. }  
  110.   
  111. function document.onclick(){  
  112.     window.status = "";  
  113.     clear_color();  
  114.     cur_row  = null;  
  115.     cur_col  = null;  
  116.     cur_cell = null;  
  117. }  
  118.   
  119. function read_def(the_table){  
  120.     for(var i=0;i<the_table.rows.length;i++){  
  121.         for(var j=0;j<the_table.rows[i].cells.length;j++){  
  122.             with(the_table.rows[i]){  
  123.                 cells[j].oBgc = cells[j].currentStyle.backgroundColor;  
  124.                 cells[j].oFc  = cells[j].currentStyle.color;  
  125.                 if(i==0){  
  126.                     cells[j].onmousedown    = drag_start;  
  127.                     cells[j].onmouseup  = drag_end;  
  128.                 }  
  129.             }  
  130.         }  
  131.     }  
  132. }  
  133.   
  134. function get_Element(the_ele,the_tag){  
  135.     the_tag = the_tag.toLowerCase();  
  136.     if(the_ele.tagName.toLowerCase()==the_tag)return the_ele;  
  137.     while(the_ele=the_ele.offsetParent){  
  138.         if(the_ele.tagName.toLowerCase()==the_tag)return the_ele;  
  139.     }  
  140.     return(null);  
  141. }  
  142.   
  143. var dragStart       = false;  
  144. var dragColStart    = null;  
  145. var dragColEnd      = null;  
  146.   
  147. function drag_start(){  
  148.     var the_td  = get_Element(event.srcElement,"td");  
  149.     if(the_td==nullreturn;  
  150.     dragStart   = true;  
  151.     dragColStart    = the_td.cellIndex;  
  152.     drag.style.width    = the_td.offsetWidth;  
  153.     drag.style.height   = the_td.offsetHeight;  
  154.     function document.onmousemove(){  
  155.         drag.style.display  = "";  
  156.         drag.style.top      = event.y - drag.offsetHeight/2;  
  157.         drag.style.left     = event.x - drag.offsetWidth/2;  
  158.         for(var i=0;i<Main_Tab.rows[0].cells.length;i++){  
  159.             with(Main_Tab.rows[0].cells[i]){  
  160.                 if((event.y>offsetTop+parseInt(document.body.currentStyle.marginTop)  &&  event.y<offsetTop+offsetHeight+parseInt(document.body.currentStyle.marginTop))  &&  (event.x>offsetLeft+parseInt(document.body.currentStyle.marginLeft)  &&  event.x<offsetLeft+offsetWidth+parseInt(document.body.currentStyle.marginLeft))){  
  161.                     runtimeStyle.backgroundColor=act_bgc;  
  162.                     dragColEnd=cellIndex;  
  163.                 }else{  
  164.                     runtimeStyle.backgroundColor="";  
  165.                 }  
  166.             }  
  167.         }  
  168.         if(!(event.y>Main_Tab.rows[0].offsetTop+parseInt(document.body.currentStyle.marginTop)  &&  event.y<Main_Tab.rows[0].offsetTop+Main_Tab.rows[0].offsetHeight+parseInt(document.body.currentStyle.marginTop))) dragColEnd=null;  
  169.     }  
  170.     drag.innerHTML = the_td.innerHTML;  
  171.     drag.style.backgroundColor = the_td.oBgc;  
  172.     drag.style.color = the_td.oFc;  
  173. }  
  174.   
  175. function drag_end(){  
  176.     dragStart = false;  
  177.     drag.style.display="none";  
  178.     drag.innerHTML = "";  
  179.     drag.style.width = 0;  
  180.     drag.style.height = 0;  
  181.     for(var i=0;i<Main_Tab.rows[0].cells.length;i++){  
  182.         Main_Tab.rows[0].cells[i].runtimeStyle.backgroundColor="";  
  183.     }  
  184.     if(dragColStart!=null  &&  dragColEnd!=null  &&  dragColStart!=dragColEnd){  
  185.         change_col(Main_Tab,dragColStart,dragColEnd);  
  186.         if(dragColStart==sort_col)sort_col=dragColEnd;  
  187.         else if(dragColEnd==sort_col)sort_col=dragColStart;  
  188.         document.onclick();  
  189.     }  
  190.     dragColStart = null;  
  191.     dragColEnd = null;  
  192.     document.οnmοusemοve=null;  
  193. }  
  194.   
  195. function clickIt(){  
  196.     event.cancelBubble=true;  
  197.     var the_obj = event.srcElement;  
  198.     var i = 0 ,j = 0;  
  199.     if(cur_cell!=null  &&  cur_row!=0){  
  200.         cur_cell.children[0].contentEditable = false;  
  201.         with(cur_cell.children[0].runtimeStyle){  
  202.             borderLeft=borderTop="";  
  203.             borderRight=borderBottom="";  
  204.             backgroundColor="";  
  205.             paddingLeft="";  
  206.             textAlign="";  
  207.         }  
  208.     }  
  209.     if(the_obj.tagName.toLowerCase() != "table"  &&  the_obj.tagName.toLowerCase() != "tbody"  &&  the_obj.tagName.toLowerCase() != "tr"){  
  210.         var the_td  = get_Element(the_obj,"td");  
  211.         if(the_td==nullreturn;  
  212.         var the_tr  = the_td.parentElement;  
  213.         var the_table   = get_Element(the_td,"table");  
  214.         var i       = 0;  
  215.         clear_color();  
  216.         cur_row = the_tr.rowIndex;  
  217.         cur_col = the_td.cellIndex;  
  218.         if(cur_row!=0){  
  219.             for(i=0;i<the_tr.cells.length;i++){  
  220.                 with(the_tr.cells[i]){  
  221.                     style.backgroundColor=cur_bgc;  
  222.                     style.color=cur_fc;  
  223.                 }  
  224.             }  
  225.         }else{  
  226.             if(show_col){  
  227.                 for(i=1;i<the_table.rows.length;i++){  
  228.                     with(the_table.rows[i].cells[cur_col]){  
  229.                         style.backgroundColor=cur_bgc;  
  230.                         style.color=cur_fc;  
  231.                     }  
  232.                 }  
  233.             }  
  234.               
  235.             the_td.mode = !the_td.mode;  
  236.             if(sort_col!=null){  
  237.                 with(the_table.rows[0].cells[sort_col])  
  238.                     removeChild(lastChild);  
  239.             }  
  240.             with(the_table.rows[0].cells[cur_col])  
  241.                 appendChild(the_td.mode?arrowUp:arrowDown);  
  242.             sort_tab(the_table,cur_col,the_td.mode);  
  243.             sort_col=cur_col;  
  244.         }  
  245.     }  
  246. }  
  247.   
  248. function dblclickIt(){  
  249.     event.cancelBubble=true;  
  250.     if(cur_row!=0){  
  251.         var the_obj = event.srcElement;  
  252.         if(the_obj.tagName.toLowerCase() != "table"  &&  the_obj.tagName.toLowerCase() != "tbody"  &&  the_obj.tagName.toLowerCase() != "tr"){  
  253.             var the_td  = get_Element(the_obj,"td");  
  254.             if(the_td==nullreturn;  
  255.             cur_cell    = the_td;  
  256.             if(the_td.children.length!=1)  
  257.                 the_td.innerHTML="<div>" + the_td.innerHTML + "</div>";  
  258.             else if(the_td.children.length==1  &&  the_td.children[0].tagName.toLowerCase()!="div")  
  259.                 the_td.innerHTML="<div>" + the_td.innerHTML + "</div>";  
  260.             cur_cell.children[0].contentEditable = true;  
  261.             with(cur_cell.children[0].runtimeStyle){  
  262.                 borderRight=borderBottom="buttonhighlight 1px solid";  
  263.                 borderLeft=borderTop="black 1px solid";  
  264.                 backgroundColor="#dddddd";  
  265.                 paddingLeft="5px";  
  266.                 //textAlign="center";  
  267.             }  
  268.         }  
  269.     }  
  270. }  
  271.   
  272. function overIt(){  
  273.     if(dragStart)return;  
  274.     var the_obj = event.srcElement;  
  275.     var i = 0;  
  276.     if(the_obj.tagName.toLowerCase() != "table"){  
  277.         var the_td  = get_Element(the_obj,"td");  
  278.         if(the_td==nullreturn;  
  279.         var the_tr  = the_td.parentElement;  
  280.         var the_table   = get_Element(the_td,"table");  
  281.         if(the_tr.rowIndex!=0){  
  282.             for(i=0;i<the_tr.cells.length;i++){  
  283.                 with(the_tr.cells[i]){  
  284.                     runtimeStyle.backgroundColor=act_bgc;  
  285.                     runtimeStyle.color=act_fc;                    
  286.                 }  
  287.             }  
  288.         }else{  
  289.             for(i=1;i<the_table.rows.length;i++){  
  290.                 with(the_table.rows[i].cells(the_td.cellIndex)){  
  291.                     runtimeStyle.backgroundColor=act_bgc;  
  292.                     runtimeStyle.color=act_fc;  
  293.                 }  
  294.             }  
  295.             if(the_td.mode==undefined)the_td.mode = false;  
  296.             the_td.style.cursor=the_td.mode?"n-resize":"s-resize";  
  297.         }  
  298.     }  
  299. }  
  300.   
  301. function outIt(){  
  302.     var the_obj = event.srcElement;  
  303.     var i=0;  
  304.     if(the_obj.tagName.toLowerCase() != "table"){  
  305.         var the_td  = get_Element(the_obj,"td");  
  306.         if(the_td==nullreturn;  
  307.         var the_tr  = the_td.parentElement;  
  308.         var the_table   = get_Element(the_td,"table");  
  309.         if(the_tr.rowIndex!=0){  
  310.             for(i=0;i<the_tr.cells.length;i++){  
  311.                 with(the_tr.cells[i]){  
  312.                     runtimeStyle.backgroundColor='';  
  313.                     runtimeStyle.color='';                
  314.                 }  
  315.             }  
  316.         }else{  
  317.             var the_table=the_tr.parentElement.parentElement;  
  318.             for(i=0;i<the_table.rows.length;i++){  
  319.                 with(the_table.rows[i].cells(the_td.cellIndex)){  
  320.                     runtimeStyle.backgroundColor='';  
  321.                     runtimeStyle.color='';  
  322.                 }  
  323.             }  
  324.         }  
  325.     }  
  326. }  
  327.   
  328. var charPYStr = "";  
  329. function judge_CN(char1,char2,mode){  
  330.     var charSet=charMode?charPYStr:charBHStr;  
  331.     for(var n=0;n<(char1.length>char2.length?char1.length:char2.length);n++){  
  332.         if(char1.charAt(n)!=char2.charAt(n)){  
  333.             if(mode) return(charSet.indexOf(char1.charAt(n))>charSet.indexOf(char2.charAt(n))?1:-1);  
  334.             else     return(charSet.indexOf(char1.charAt(n))<charSet.indexOf(char2.charAt(n))?1:-1);  
  335.             break;  
  336.         }  
  337.     }  
  338.     return(0);  
  339. }  
  340.   
  341. function sort_tab(the_tab,col,mode){  
  342.     var tab_arr = new Array();  
  343.     var i;  
  344.     var start=new Date;  
  345.     for(i=1;i<the_tab.rows.length;i++){  
  346.         tab_arr.push(new Array(the_tab.rows[i].cells[col].innerText.toLowerCase(),the_tab.rows[i]));  
  347.     }  
  348.     function SortArr(mode) {  
  349.         return function (arr1, arr2){  
  350.             var flag;  
  351.             var a,b;  
  352.             a = arr1[0];  
  353.             b = arr2[0];  
  354.             if(/^(\+|-)?\d+($|\.\d+$)/.test(a)  &&  /^(\+|-)?\d+($|\.\d+$)/.test(b)){  
  355.                 a=eval(a);  
  356.                 b=eval(b);  
  357.                 flag=mode?(a>b?1:(a<b?-1:0)):(a<b?1:(a>b?-1:0));  
  358.             }else{  
  359.                 a=a.toString();  
  360.                 b=b.toString();  
  361.                 if(a.charCodeAt(0)>=19968  &&  b.charCodeAt(0)>=19968){  
  362.                     flag = judge_CN(a,b,mode);  
  363.                 }else{  
  364.                     flag=mode?(a>b?1:(a<b?-1:0)):(a<b?1:(a>b?-1:0));  
  365.                 }  
  366.             }  
  367.             return flag;  
  368.         };  
  369.     }  
  370.     tab_arr.sort(SortArr(mode));  
  371.   
  372.     for(i=0;i<tab_arr.length;i++){  
  373.         the_tab.lastChild.appendChild(tab_arr[i][1]);  
  374.     }  
  375.   
  376.     window.status = " (Time spent: " + (new Date - start) + "ms)";  
  377. }  
  378.   
  379. function change_row(the_tab,line1,line2){  
  380.     the_tab.rows[line1].swapNode(the_tab.rows[line2])  
  381. }  
  382.   
  383. function change_col(the_tab,line1,line2){  
  384.     for(var i=0;i<the_tab.rows.length;i++)  
  385.         the_tab.rows[i].cells[line1].swapNode(the_tab.rows[i].cells[line2]);  
  386. }  
  387.   
  388. function Move_up(the_table){  
  389.     event.cancelBubble=true;  
  390.     if(cur_row==null || cur_row<=1)return;  
  391.     change_row(the_table,cur_row,--cur_row);  
  392. }  
  393.   
  394. function Move_down(the_table){  
  395.     event.cancelBubble=true;  
  396.     if(cur_row==null || cur_row==the_table.rows.length-1 || cur_row==0)return;  
  397.     change_row(the_table,cur_row,++cur_row);  
  398. }  
  399.   
  400. function Move_left(the_table){  
  401.     event.cancelBubble=true;  
  402.     if(cur_col==null || cur_col==0)return;  
  403.     change_col(the_table,cur_col,--cur_col);  
  404.     if(cur_col==sort_col)sort_col=cur_col+1;  
  405.     else if(cur_col+1==sort_col)sort_col=cur_col;  
  406. }  
  407.   
  408. function Move_right(the_table){  
  409.     event.cancelBubble=true;  
  410.     if(cur_col==null || cur_col==the_table.rows[0].cells.length-1)return;  
  411.     change_col(the_table,cur_col,++cur_col);  
  412.     if(cur_col==sort_col)sort_col=cur_col-1;  
  413.     else if(cur_col-1==sort_col)sort_col=cur_col;  
  414. }  
  415.   
  416. function add_row(the_table) {  
  417.     event.cancelBubble=true;  
  418.     var the_row,the_cell;  
  419.     the_row = cur_row==null?-1:(cur_row+1);  
  420.     clear_color();  
  421.     var newrow=the_table.insertRow(the_row);  
  422.     for (var i=0;i<the_table.rows[0].cells.length;i++) {  
  423.         the_cell=newrow.insertCell(i);  
  424.         the_cell.innerText="NewRow_" + the_cell.parentElement.rowIndex;  
  425.     }  
  426.     read_def(the_table);  
  427. }  
  428.   
  429. function del_row(the_table) {  
  430.     if(the_table.rows.length==1return;  
  431.     var the_row;  
  432.     the_row = (cur_row==null || cur_row==0)?-1:cur_row;  
  433.     the_table.deleteRow(the_row);  
  434.     cur_row = null;  
  435.     cur_cell=null;  
  436. }  
  437.   
  438. function add_col(the_table) {  
  439.     event.cancelBubble=true;  
  440.     var the_col,i,the_cell;  
  441.     the_col = cur_col==null?-1:(cur_col+1);  
  442.     var the_title=prompt("Please input the title: ","Untitled");  
  443.     if(the_title==null)return;  
  444.     if(the_col!=-1  &&  the_col<=sort_col  &&  sort_col!=null)sort_col++;  
  445.     the_title=the_title==""?"Untitled":the_title  
  446.     clear_color();  
  447.     for(var i=0;i<the_table.rows.length;i++){  
  448.         the_cell=the_table.rows[i].insertCell(the_col);  
  449.         the_cell.innerText=i==0?the_title:("NewCol_" + the_cell.cellIndex);  
  450.     }  
  451.     read_def(the_table);  
  452. }  
  453.   
  454. function del_col(the_table) {  
  455.     if(the_table.rows[0].cells.length==1return;  
  456.     var the_col,the_cell;  
  457.     the_col = cur_col==null?(the_table.rows[0].cells.length-1):cur_col;  
  458.     if(the_col!=-1  &&  the_col<sort_col  &&  sort_col!=null)sort_col--;  
  459.     else if(the_col==sort_col)sort_col=null;  
  460.     for(var i=0;i<the_table.rows.length;i++) the_table.rows[i].deleteCell(the_col);  
  461.     cur_col = null;  
  462.     cur_cell=null;  
  463. }  
  464.   
  465. function res_tab(the_table){  
  466.     the_table.outerHTML=Org_con;  
  467.     init();  
  468. }  
  469.   
  470. function exp_tab(the_table){  
  471.     var the_content="";  
  472.     document.onclick();  
  473.     the_content=the_table.outerHTML;  
  474.     the_content=the_content.replace(/ style=\"[^\"]*\"/g,"");  
  475.     the_content=the_content.replace(/ mode=\"(false|true)"/g,"");  
  476.     the_content=the_content.replace(/ oBgc=\"[\w#\d]*\"/g,"");  
  477.     the_content=the_content.replace(/ oFc=\"[\w#\d]*\"/g,"");  
  478.     the_content=the_content.replace(/<DIV contentEditable=false>([^<]*)<\/DIV>/ig,"$1");  
  479.     the_content="<style>table{font-size: 9pt;word-break:break-all;cursor: default;BORDER: black 1px solid;background-color:#eeeecc;border-collapse:collapse;border-Color:#999999;align:center;}</style>\n"+the_content;  
  480.     var newwin=window.open("about:blank","_blank","");  
  481.     newwin.document.open();  
  482.     newwin.document.write(the_content);  
  483.     newwin.document.close();  
  484.     newwin=null;  
  485. }  
  486. </script>  
  487. <TABLE width=100% border=1 cellSpacing=0 cellPadding=2 id="PowerTable">  
  488. <TR align=middle bgColor=#ffcc00>  
  489. <TD>First Name</TD>  
  490. <TD>Last Name</TD>  
  491. <TD>Team</TD>  
  492. <TD>Engine</TD>  
  493. <TD>Tyres</TD>  
  494. <TD>Fastest Lap</TD>  
  495. <TD>国家</TD></TR>  
  496. <TR>  
  497. <TD>Juan-Pablo</TD>  
  498. <TD>Montoya</TD>  
  499. <TD>Williams</TD>  
  500. <TD>BMW</TD>  
  501. <TD>Michelin</TD>  
  502. <TD>1.17.123</TD>  
  503. <TD>柬埔寨</TD></TR>  
  504. <TR>  
  505. <TD>David</TD>  
  506. <TD>Coulthard</TD>  
  507. <TD>McLaren</TD>  
  508. <TD>Mercedes</TD>  
  509. <TD>Bridgestone</TD>  
  510. <TD>1.16.423</TD>  
  511. <TD>泰国</TD></TR>  
  512. <TR>  
  513. <TD>Mika</TD>  
  514. <TD>Hakkinen</TD>  
  515. <TD>McLaren</TD>  
  516. <TD>Mercedes</TD>  
  517. <TD>Bridgestone</TD>  
  518. <TD>1.16.979</TD>  
  519. <TD>越南</TD></TR>  
  520. <TR>  
  521. <TD>Jarno</TD>  
  522. <TD>Trulli</TD>  
  523. <TD>Jordan</TD>  
  524. <TD>Honda</TD>  
  525. <TD>Bridgestone</TD>  
  526. <TD>1.16.459</TD>  
  527. <TD>菲律宾</TD></TR>  
  528. <TR>  
  529. <TD>Ricardo</TD>  
  530. <TD>Zonta</TD>  
  531. <TD>Jordan</TD>  
  532. <TD>Honda</TD>  
  533. <TD>Bridgestone</TD>  
  534. <TD>1.17.328</TD>  
  535. <TD>英国</TD></TR>  
  536. <TR>  
  537. <TD>Gloria</TD>  
  538. <TD>Slap</TD>  
  539. <TD>Lotus</TD>  
  540. <TD>Renault</TD>  
  541. <TD>Michelin</TD>  
  542. <TD>1.15.012</TD>  
  543. <TD>日本</TD></TR>  
  544. </TABLE>  
  545.   
  546. <input type=button value=ins_row οnclick=add_row(Main_Tab)>  
  547. <input type=button value=ins_col οnclick=add_col(Main_Tab)>  
  548. <input type=button value=Del_row οnclick=del_row(Main_Tab)>  
  549. <input type=button value=Del_col οnclick=del_col(Main_Tab)>  
  550. <input type=button value=Restore οnclick=res_tab(Main_Tab)>  
  551. <input type=button value=Export  οnclick=exp_tab(Main_Tab)>  
  552.  ( Move:   
  553. <input type=button id=move value=Up    οnclick=Move_up(Main_Tab)>  
  554. <input type=button id=move value=Down  οnclick=Move_down(Main_Tab)>  
  555. <input type=button id=move value=Left  οnclick=Move_left(Main_Tab)>  
  556. <input type=button id=move value=Right οnclick=Move_right(Main_Tab)> )  
  557.   
  558. <span style="cursor:hand; color: red; text-Decoration: underline" οnclick="if(detail.style.display==''){detail.style.display='none';this.innerText='Show Detail'}else{detail.style.display='';this.innerText='Hide Detail'}">Show Detail</span>  
  559. <div id=detail style="display:none">  
  560. <input type=text id=monitor size=30 style="width:200px">  
  561. <textarea id=showContent cols=100 rows=20
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值