Javascript operation table

Source: Internet
Author: User

<P> <meta http-equiv = "Content-Type" content = "text/html; charset = gb2312 "> <title> Power Table </title> <style> body {FONT-SIZE: 9pt; PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; PADDING-TOP: 0px;} input {FONT-SIZE: 9pt; height: 15pt; width: 50px; cursor: default;} table {font-size: 9pt; word-break: break-all; cursor: default; BORDER: black 1px solid; background-color: # eeeecc; border-collapse: c Ollapse; border-Color: #999999; align: center ;} </style> <TABLE width = 100% border = 1 cellSpacing = 0 cellPadding = 2 id = "PowerTable"> <TR align = middle bgColor = # ffcc00> <TD> First Name </TD> <TD> Last Name </TD> <TD> Team </TD> <TD> Engine </TD> <TD> Tyres </TD> <TD> Fastest lap </TD> <TD> country </TD> </TR> <TD> Michael </TD> <TD> Schumacher </TD> <TD> Ferrari </TD> <TD> Ferrari </TD> <TD> Bridgestone </TD> <TD> 1.15.872 </TD> <TD> Germany </TD> </TR> <TR> <TD> Rubens </TD> <TD> Barrichello </TD> <TD> Ferrari </TD> <TD> Bridgestone </TD> <TD> 1.16.760 </TD> <TD> France </TD> </TR> <TD> Ralph </TD> <TD> Schumacher </TD> <TD> Williams </TD> <TD> BMW </TD> <TD> Michelin </TD> <TD> 1.16.297 </TD> <TD> USA </TD> </TR> <TD> Juan-Pablo </TD> <TD> Montoya </TD> <TD> Williams </TD> <TD> BMW </TD> <TD> Michelin </TD> <TD> 1.17.123 </TD> <TD> Cambodia </TD> </TR> <TD> David </TD> <TD> Coulthard </TD> <TD> McLar En </TD> <TD> Mercedes </TD> <TD> Bridgestone </TD> <TD> 1.16.423 </TD> <TD> Thailand </TD> </TR> <TR> <TD> Mika </TD> <TD> Hakkinen </TD> <TD> McLaren </TD> <TD> Mercedes </TD> <TD> Bridgestone </TD> <TD> 1.16.979 </TD> <TD> Vietnam </TD> </TR> <TD> Jarno </TD> <TD> Trulli </TD> <TD> Jordan </TD> <TD> Honda </TD> <TD> Bridgestone </TD> <TD> 1.16.459 </TD> <TD> Philippines </TD> </TR> <TD> Ricardo </TD> <TD> Zonta </TD> <TD> Jordan </TD> <TD> Honda </ TD> <TD> Bridgestone </TD> <TD> 1.17.328 </TD> <TD> UK </TD> </TR> <TD> Olivia </TD> <TD> Panis </TD> <TD> BAR </TD> <TD> Honda </TD> <TD> Bridgestone </TD> <TD> 1.16.771 </TD> <TD> Mongolia </TD> </TR> <TR> <TD> Jacques </TD> <TD> keep eneuve </TD> <TD> BAR </TD> <TD> Honda </TD> <TD> Bridgestone </TD> <TD> 1.172.1635 </TD> <TD> Malaysia </TD> </TR> <TD> Kimi </TD> <TD> Raikkonen </ TD> <TD> Sauber </TD> <TD> Petronas </TD> <TD> Bridgestone </TD> <TD> 1.16.875 </TD> <TD> Myanmar </ TD> </TR> <TD> Nick </TD> <T D> Heidfeld </TD> <TD> Sauber </TD> <TD> Petronas </TD> <TD> Bridgestone </TD> <TD> 1.17.165 </TD> <TD> North Korea </TD> </TR> <TD> Eddie </TD> <TD> Irvine </TD> <TD> Jaguar </TD> <TD> Cosworth </TD> <TD> Michelin </TD> <TD> 1.1838516 </TD> <TD> China </TD> </TR> <TD> pedro </TD> <TD> de la Rosa </TD> <TD> Jaguar </TD> <TD> Cosworth </TD> <TD> Michelin </TD> <TD> 1.1838515 </TD> <TD> Russia </TD> </TR> <TD> Hugh </TD> <TD> Gengine </TD> <TD> Lotus </TD> <TD> Renault </TD> <T D> Michelin </TD> <TD> 1.15.015 </TD> <TD> Korea </TD> </TR> <TD> Gloria </TD> <TD> Slap </TD> <TD> Lotus </TD> <TD> Renault </TD> <TD> Michelin </TD> <TD> 1.15.012 </TD> <TD> Japan </TD> </TR> </TABLE> <p> <input type = button value = ins_row onclick = add_row (Main_Tab)> <input type = button value = ins_col onclick = add_col (Main_Tab)> <input type = button value = Del_row onclick = del_row (Main_Tab)> <input type = button value = Del_col onclick = del_col (Mai N_Tab)> <input type = button value = Restore onclick = res_tab (Main_Tab)> <input type = button value = Export onclick = exp_tab (Main_Tab)> (Move: <input type = button id = move value = Up onclick = Move_up (Main_Tab)> <input type = button id = move value = Down onclick = Move_down (Main_Tab)> <input type = button id = move value = Left onclick = Move_left (Main_Tab)> <input type = button id = move value = Right onclick = Move_right (Main_Tab)>) Chinese Character sorting Order: <select id = sel_Mode onchange = "charMode = this. selectedIndex "> <option> pinyin <option> strokes </select> Show Detail </p> <input type = text id = monitor size = 30 style =" width: 300px "> <pre class =" code "id = showContent cols = 100 rows = 20> </textarea> <pre class =" code "cols = 100 rows = 20> main features: </P> <P> Any standard data table (no cross-row or cross-column data) can take effect only by setting the id! </P> <P> arbitrarily modify or delete the row and column of the editing table </P> <P> Generate a data table </P> <P> new function: sort Chinese characters, drag the table header to swap columns, correct several bugs, and further enhance table independence (you only need to add id = PowerTable in the table )~~~~~~ </P> <P> if you reference a large page, point the content of the window. onload event to PowerTable! </P> <P> the writing is a bit messy without writing comments. In fact, at the beginning, I just wanted to practice insertRow ~~~~~ </P> <P>
[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.