Home >Web Front-end >JS Tutorial >Use jQuery to implement editable tables_jquery

Use jQuery to implement editable tables_jquery

WBOY
WBOYOriginal
2016-05-16 16:46:541313browse

Today we learned the example of using jQuery to implement an editable table. The requirements for this example are as follows: click on a cell in the foreground table to modify its content, press Enter to save the modified content, and esc to undo the saved content. Principle: When you click a client table cell, add a text box in the cell, assign the original content in the cell to the text box, and then further modify the text box content. After modification, reassign the text box content to cell.

Source code:

Frontend code:

Copy code The code is as follows:

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="WebApplication1.WebForm1" %>



jq2—editable table



<%--