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)