Add, delete, modify, and set the color of the odd and even rows in the jquery table.

Source: Internet
Author: User
In the last week, I learned a little bit about HTML, CSS, javascript, and jquery using javascript to complete a simple table operation, which has the functions of adding, deleting, and modifying. The table consists of three columns: Student ID, Student name, and age. In name and... SyntaxHighlighter. all (

In the last week, I learned a little bit about HTML, CSS, javascript, and jquery using javascript to complete a simple table operation, which has the functions of adding, deleting, and modifying.

The table consists of three columns: Student ID, Student name, and age. Enter data in the name and age boxes, and click "Add" to Add data (the ID number is automatically generated progressively ), enter the ID number and enter the new name and age point "Edit" to modify it. If you Delete the ID number, click "Delete" to Delete the specified row.

At the top of the table, the number of rows in the current table is updated in a timely manner. When the ID is entered, the table dynamically responds and updates the content of the name age input box. The program achieves basic operability. The table header uses CSS for color control, and the content in the table uses CSS to set different colors based on parity. In this way, the interface becomes more beautiful.

Below is:


 

The complete code is as follows (Win7 + IE9 passed the test ):

// By MoreWindows (http://www.2cto.com)
 
 

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.