Ajax excel-like table copy Function

Source: Internet
Author: User
Tags delete key

<! Doctype html public "-// W3C // dtd html 4.01 Transitional // EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd"> <HTML> <HEAD> <TITLE> imitation Excel table demo </TITLE> <META http-equiv = Content-Type content = "text/html; charset = gb2312 "> <META http-equiv = MSThemeCompatible content = No> <STYLE type = text/css> BODY {FONT-SIZE: 12px; FONT-FAMILY: Arial, Helvetica, sans-serif; BACKGROUND-COLOR: # e9edf7} # tbBackgrou Nd {BACKGROUND-COLOR: # ffffff; TEXT-ALIGN: center} # tbData {BACKGROUND-COLOR: # dde3ec} # tbData TD {BACKGROUND-COLOR: # ffffff} # tbData INPUT {WIDTH: 50px; BORDER-TOP-STYLE: none; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BORDER-BOTTOM-STYLE: none} # tbData. checkbox {WIDTH: 15px} # tbData THEAD {} # tbTopOpt A {BORDER-RIGHT: #999999 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #9999 99 1px solid; DISPLAY: block; PADDING-LEFT: 5px; PADDING-BOTTOM: 5px; BORDER-LEFT: #999999 1px solid; WIDTH: 80px; COLOR: #000000; PADDING-TOP: 5px; BORDER-BOTTOM: #999999 1px solid; BACKGROUND-COLOR: # f8f9fc; TEXT-DECORATION: none} # tbTopOpt A: hover {BACKGROUND-COLOR: # dde3ec} # tbBomOpt A {BORDER-RIGHT: #999999 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #999999 1px solid; DISPLAY: block; PADD ING-LEFT: 5px; PADDING-BOTTOM: 5px; BORDER-LEFT: #999999 1px solid; WIDTH: 80px; COLOR: #000000; PADDING-TOP: 5px; BORDER-BOTTOM: #999999 1px solid; BACKGROUND-COLOR: # f8f9fc; TEXT-DECORATION: none} # tbBomOpt A: hover {BACKGROUND-COLOR: # dde3ec} # tbData A {COLOR: #000000; TEXT-DECORATION: none} # divShowInput {BORDER-RIGHT: # dde3ec 1px solid; BORDER-TOP: # dde3ec 1px solid; DISPLAY: none; Z-IND EX: 10; LEFT: 350px; OVERFLOW: hidden; BORDER-LEFT: # dde3ec 1px solid; WIDTH: 100px; BORDER-BOTTOM: # dde3ec 1px solid; POSITION: absolute; TOP: 30px; BACKGROUND-COLOR: # f8f9fc} # divShowInput A {DISPLAY: block; WIDTH: auto; COLOR: #000000; BACKGROUND-COLOR: # f8f9fc; TEXT-ALIGN: center; TEXT-DECORATION: none} # divShowInput A: hover {BORDER-RIGHT: # ff0000 2px solid; BORDER-LEFT: # ff0000 2px solid; COLOR: # ff0000; BACKGROUND-COLOR: # dde3ec} # divShowInput P {PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BORDER-BOTTOM-COLOR: # dde3ec; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; BACKGROUND-COLOR: # f8f9fc; TEXT-ALIGN: center; BORDER-BOTTOM-STYLE: double} # divFoltupDiv {DISPLAY: none; Z-INDEX: 1001; RIGHT: 0px; FILTER: progid: DXImageTransform. microsoft. alphaImageLoader (enabled = true, sizingMe Thod = scale, src1_'gb.png '); LEFT: 0px; PADDING-BOTTOM: 300px; WIDTH: 100%; BOTTOM: 0px; PADDING-TOP: 270px; POSITION: absolute; TOP: 0px; TEXT-ALIGN: center} UNKNOWN {BACKGROUND-IMAGE: url(gb.png); BACKGROUND-REPEAT: repeat} P # sendokBiginf {FONT-SIZE: 20px; COLOR: red} </STYLE> <META content = "MSHTML 6.00.2800.1400" name = GENERATOR> </HEAD> <BODY> <P> send data </P> <P id = sendokBiginf> </P> <P id = sendo Kinf> </P> <TABLE id = tbBackground cellSpacing = 0 cellPadding = 0 width = 760 align = center border = 0> <TBODY> <TR> <TD> </TD> </TR> <TD> <TABLE id = tbData cellSpacing = 1 cellPadding = 0 width = 750 align = center border = 0> <THEAD> <TR> <TD height = 25> select all </TD> <TD> A1 </TD> <TD> A2 </TD> <TD> A3 </TD> <TD> A4 </TD> <TD> A5 </TD> <TD> A6 </TD> <TD> A7 </TD> <TD> A8 </TD> <TD> A9 </TD> <TD> A10 </TD> <TD> A11 </TD> </TR> </THEAD> <TBODY> <TR> <TD> <INPUT class = checkbox type = checkbox value = checkbox name = checkbox> </TD> <INPUT name = A1> </TD> <TD> <INPUT name = A2> </TD> <INPUT name = A3> </TD> <INPUT name = A4> </TD> <TD> <INPUT name = A5> </TD> <INPUT name = A6> </TD> <INPUT name = A7> </TD> <TD> <INPUT name = A8> </TD> <INPUT name = A9> </TD> <INPUT name = A10> </TD> <INPUT name = A11> </TD> </TR> </TBODY> </TABLE> </TD> </TR> <TD> <TABLE id = tbBomOpt cellSpacing = 0 cellPadding = 0 width = 700 align = center border = 0> <TBODY> <TR> <TD width = 125 height = 40> copy selected </ TD> <TD width = 537> Delete selected </TD> <TD width = 537> clear all </TD> <TD width = 537> submit </TD> <TD width = 38> </TD> </TR> </TBODY> </TABLE> Operation Method 1: keyboard operation 1. insert key adds a row and copies the content of the last row. Delete key deletes the last row. This operation is used to adjust the total table size. 2. the Tab key moves the cursor horizontally, and the Enter key moves the cursor vertically, in line with Excle user habits; 2. Page Operation 1. select All: select all rows and release all rows again; 2. copy selected: copied The selected row and its content; 3. delete selected: delete selected rows. 4. clear selected: Clear the content in all cells (input); 5. submit: send data content to Server 3. Double-click cells to bring up a menu. The menu automatically collects all input content that are not repeated in the column, which facilitates repeated data input. </BODY> </HTML>
[Ctrl + A select all Note: If you need to introduce external Js, You need to refresh it to execute]

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.