Today I learned how to use jQuery to edit a table. In this example, you can click a cell in the foreground table to modify the content. Press enter to save the modified content and esc to cancel the saved content. Principle: When you click a table cell on the client, add a text box to the cell, assign the original content to the text box, and then modify the text box content, after modification, the text box content is assigned to the cell.
Source code:
Front-end code:
Jq2-
Jquery-based code for editable drop-down boxes and jquery drop-down boxes
The principle is to add a ul simulated drop-down box to a textbox and use font to simulate a drop-down button.
I. create static results
First use css and html to make a proper look. Here these two fonts are used and can be created on the icomoon website. The advantage of using a font is that it is convenient to locate the font with the input box and can control the size and colo
The HTML is roughly as follows:(This is only part of it, but the demo is enough)Add an event to the Eidt button in the JS file and implement the. Test-holder Div's editable:Body.on (' click ', '. Text_holder. Btn-group. Edit ', function () {var Divedit = $ (this). Parent (). parent (); if (!divedit) {return; } if (Divedit.children ("input"). Length > 0) {return; } var mtext = Divedit.text (). substring (0, Divedit.text (). length-10); var inputins = $ (":Resources:http://blog.csdn.net/
Create editable table effects based on JQuery.
Recently, a project was created. project requirements: click a table and you can directly edit the project. Press ENTER or click another place on the page to edit the project. Press Esc to cancel editing.
The two partners provided the solution for the second phase. Let's take a look at which one is more appropriate?
First, you can click a table to edit the table.
Copy codeThe Code is as follows:// Equival
1. Select the area where you can modify the edit, switch to the Review tab, and in the Change column, select Allow users to edit the area.
2, in the pop-up "Allow users to edit" page box, click "New."
3, in the pop-up "New Area" page box, locate the "Pick" button to the right of the Reference cell text box, select the cells that can be edited and press the OK button.
4, the page is back to the "Allow users to edit" page box, open the Protect Sheet page box.
Since the system's own select is really bad, here I write a new select with JavaScript.
Function:
1. Editable Select
2. The length can be changed arbitrarily
3. Can cover system select
4. Support Forms
5. Support CSS to modify the appearance
6. Fix the problem of running errors on IE 5.0
7. Support the use of JS script
How to use
[B]var materialized variable =new editselect (name, length, default string, width, height, read only) [/b]
[b] Materialize
This article describes the JS implementation of the editable background Management menu function. Share to everyone for your reference, specific as follows:
The Operation effect chart is as follows:
Full instance code click here to download the site.
More readers interested in JavaScript-related content can view the site topics: "javascript array Operation tips Summary", "JavaScript Mathematical operational Usage Summary", "JavaScript da
The contents of each cell in the MSFlexGrid control can not be edited directly by the user, but we can use some small techniques to facilitate the implementation of this editing function to extend the MSFlexGrid application (this is a very common function in practical applications).
You can easily edit the MSFlexGrid control data by just doing the following
Example puts a text box Text1 on a form, and a MSFlexGrid control FLEXGRID1
Add the following example code
Private Sub Form_Load() Tex
query data, and then click on the check mark, then go to the toolbar to submit the transaction is OK;Ps:If you look closely, you will find that there is a difference between the two, the former is when you click on a small lock, modify and then click on the check mark, transaction submission and rollback button is lit.The latter is the SQL that executes for update, the commit of the transaction and the rollback button are on, and if you do, the record will be locked unless you manually commit o
Recently in the project, to achieve by double-clicking the table Table of the TR, so that the table row can be editable, to achieve the ability to modify data and save to the database, no need to say, directly paste the code bar. I hope I can get my colleagues to correct you.1 functionTdedit (element, id) {2 vari_a = ";3 varI_b = "'/>";4 varT_a = ";5 varT_b = ";6 varTD = $ (Element). FIND ("TD");7 if(Td.length > 0) {8 v
Http://www.jianli86.com/qiuzhijianli/
To apply for a foreign company, you must first submit your resume. Your resume is the first level in a foreign company. After your resume is approved, you will enter the next recruitment.ProgramOtherwise, it will be blocked outside the door of foreign companies. So what kind of resume
First, prefaceTake a look at WPF's own ComboBox in a non-editable state, with custom ItemTemplate, as shown in the results: Its currently selected item (within the red box) is the same as the custom ItemTemplate; But C1combobox's non-editable state (iseditable= "False"): Always feel that its non-editing status is not completed, although the numbers and English can not be entered, but in the red box will s
This article describes how to use jQuery to easily edit a table based on Bootstrap. For more information, see
EditTable. jsAllows you to edit the current row of a table, add a row, and delete the current row. You can set parameters, such:
OperatePos is used to set the placement operation column, starting from 0.-1 indicates that the last column is used as the placement operation column; (operations include editing the current row, adding a row under the current row, and deleting the current row
ExtJS this framework, and did not learn and use, only know is a popular front frame, and easy ui,bui,dwz, such as these frameworks are similar, but more powerful than they are, the reason for writing this, I think it is very helpful.
Today, my friend came across a problem: The Drop-down list in ExtJS How to set non-editable, not editable in HTML, but now the Drop-down list boxes in this UI frame are
response of the field information TD has given a class and id attribute, and assigned a value. It is worth mentioning that the TD in the table corresponding to the value of the ID and the database in the field name one by one corresponds to do so in order to edit the background to get the corresponding field information, the following PHP code will be mentioned.CSS
table{width:96%; margin:20px auto; border-collapse:collapse;}
Table td{line-height:26px; padding:2px; padding-left:8px; bo
It's simple to introduce a few this time, but be sure to return the value rule carefully.
1.resume of parameters
The resume function can continue to pass other parameters besides the first parameter, the following code:
Copy Code code as follows:
Local CO = coroutine.create (function (name)
print (name);
End);
Coroutine.resume (CO, "resume
Let me explain it first! This article was intended to be kept for later use. I shared too many posts and was afraid that I could not find them when I used them. So I reprinted them. You may find it useful at any time. Reprinting and sharing are no problem ......
Here, we will be able to serve as a platform for people to exchange ideas, submit resumes, and interview experiences.
Http://www.51mentor.com/resume/index.php
There is also a lot of
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.