Editable Table: How does jQuery + PHP implement real-time editing of table fields? In this example, we click jQuery to change the text information to an editable form. you can edit the text content and click "OK, the new content will be sent to the backend PHP program for processing and saved to the database. when you click the "cancel" button, the page will be restored to an
1. Editable: Setting the contentEditable attribute enables div programming to be editable.2. Drag: $ ('# Move'). draggable ();The draggable of jQuery UI enables the div to be dragged, but if the two attributes are applied at the same time, the Editable function becomes invalid.3. editable and scalable: Copy codeThe Cod
Recent projects need to modify the mobile phone number to send a verification code when the contents of the input box can not be modified, the Internet to check the information displayed as follows:1. Sometimes, we want the text boxes in the form to be read-only, so that users cannot modify the information in them, such as the method 1:onfocus=this.blur () method 2:readonly method 3:disabled Can use the third type of2, first explain that these methods are set up in the beg
. selectedCell. colIndex; // obtain the row number var rowIndex = cellModel. selectedCell. rowIndex;
Editable GridPanel
Ext. Net GridPanel has two editing modes: Edit cells and edit rows.
Cell Editing:
Row Editing:
As you can see, when you edit a cell, only the cell enters the editing mode, while in the row editing mode, all the Editable fields of the edit row are uniformly edited.
To edit Ext. Net GridP
Function:
Click "cell selection" and use the direction key to change the selected cell. Press the Enter key or double-click the cell to enter the Editable State during the selection. When the cell loses focus, the modified content is saved.
Main Implementation ideas:The selection and moving of selected regions are implemented by jQuery's powerful API. The editable cell actually adds an input field to the c
For example, the original course editing area is only as large as the left side. after the scaleEnabled: true option is set, the stretched area is changed to the left side, but the editable area is still as large as the left side, and the right side is useless. How to break
For example, the original course editing area is only as large as the left side. after the scaleEnabled: true option is set, the stretched area is changed to the left side, but
The input boxes used to search for information in Baidu or Google can all display the relevant search keywords in the drop-down menu when we enter a small amount of text, you can select the keyword you want to search for to quickly obtain the required information. This function uses the automatically completed editable text input box control. In Android UI development, there is also a control named autocompletetextview. With this control, we can imple
Feature Description: The component combines the text box and the drop-down box, when you click the rightmost drop-down button to implement the function of the dropdown box selection, and when you select the text box, implement the text box input function. Set the text box and drop-down box as the Name property he automatically passes the value of the corresponding drop-down box into the background, and the value of the text box does not pass, and when you do the text box, it passes the value of
To implement editable table functions, we will address the following issues:
1. Identify the columns in the table where the data to be modified is found (how to find the cells);
2. How to make cells can be edited;
3. How to handle some key events in a cell;
4. Resolve Cross-browser issues.
We can work through jquery to solve these problems step-by-step.
First, draw the table
First, let's draw a table first.
Code1:
Copy Code code as follows:
Code for editable tables based on PHP + Jquery. For more information, see. Table. php
The Code is as follows:
Header ("Content-Type: text/html; charset = UTF-8 ");$ Mysqli = new MySQLi ("localhost", "root", "123456", "xiaoqiangdb ");If (mysqli_connect_errno ){Echo "failed to connect to Database". mysqli_connect_error ();Exit;}?> Editable table
The recent project front end uses Jquery+easyui to do, for a few months, think Easyui is a very good open source front-end UI Framework,Although occasionally encounter some small problems, but with many years of front-end development of the strength of the accumulation have been solved, of which the more typical isThis Easyui.editgrid plug-in, is based on the Easyui.datagrid extension. In fact, it can be achieved only with Easyui.datarid.Similar functionality, but very slow, user experience is v
JQuery uses Ajax to double-click a Table to make the Table editable and save it to the database.
Recently, when you are working on a project, you need to double-click the TR of the Table to make the Table row editable to modify the data and save the data to the database. You don't need to talk about it. paste the Code directly. I hope you can get my comments.1 function tdEdit (element, id) {2 var I _a = "Fr
Bingway original works. for reprinting, please indicate the author and source.
In Web programming, the Editable drop-down list is always a problem, and the following third-party controls and JS controls the select control.CodeBut compatible with all browsers,
The drop-down box is closely integrated with the text box, but it is not so easy to implement. Recently, when I was working on a project, I thought of
The dropdownlist
An editable unit can display multiple attribute fields in one column. It can provide verification for the editing unit and customize verification events.Code: Slickgrid example 3A: editable Unit
Running Treeview Control
For perfection, list 4 contains the final treevie control of VB. NET version and or C # version. To make it easier to use, I have redefined the structure and code. The keydown control is added to support some default shortcut keys, such as control-N (new), F2 (edit), and del (delete ).
It seems that there is no need to attach any event, so the final API contains a method and eight attributes. They are listed in Table 1. Most of them are simple signs or default switches,
EasyUI Editable Tree, easyuieditable
Effect
Create Tree
Set the url, createUrl, updateUrl, destroyUrl, and dndUrl attributes to automatically synchronize data to the server.
Url: returned tree data
CreateUrl: when a new node is created, the tree will pass in a parameter named parentId, indicating the parent node ID.
UpdateUrl: when updating a node, the id and text parameters are passed in to the server.
DestroyUrl: When a node is destroyed, the id
EasyUI DataGrid: editable cell, easyuidatagrid
Effect
First, add an editor attribute to the column to be editable. The column is defined as the numberbox editing type.
When a user clicks a row, we start an editing action.
$ ('# Dg '). datagrid ({onClickCell: function (index, field, value) {$ (this ). datagrid ('ineinedit ', index); var ed = $ (this ). datagrid ('geteditor', {index: index, field: f
Brief tutorials
This is an editable Microsoft Word style document made with HTML and CSS3. This effect provides a predefined set of styles for creating word-style document effects of various sizes in a Web page. The styles it provides include:
SHEETS-OF-PAPER-A4.CSS:A4 paper (21cmx29.7cm)
SHEETS-OF-PAPER-A3.CSS:A3 paper (29.7cmx42cm)
Sheets-of-paper-usletter.css:us Letter (21.6cmx27.9cm)
Sheets-of-paper-uslegal.css:us Legal (21.6cmx35.
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.