I want to click the "Updqte" button after the button becomes "save", then the cell becomes a text box, after editing the text box, click "Save" Results submitted to the database. Button change with JS finished, the other really is not back, you big God help it.
<! DOCTYPE HTML PUBLIC "-//w3c//dtd HTML 4.01 transitional//en" "Http://www.w3.org/TR/html4/loose.dtd" >
Reply to discussion (solution)
1. Give your save button an OnClick method to trigger after clicking
2. Using AJAX to submit parameters to the background, invoking the PHP program
3. Then submit the received content to the database
4. Successful or failed to return to page
You're going to use Ajax to submit the data.
1. Give your save button an OnClick method to trigger after clicking
2. Using AJAX to submit parameters to the background, invoking the PHP program
3. Then submit the received content to the database
4. Successful or failed to return to page
<! DOCTYPE HTML PUBLIC "-//w3c//dtd HTML 4.01 transitional//en" "Http://www.w3.org/TR/html4/loose.dtd" >
The red part of my table is an array, and I want to make the array dynamic, or else all the buttons will only manipulate one piece of data. Is there any good way?
1. Give your save button an OnClick method to trigger after clicking
2. Using AJAX to submit parameters to the background, invoking the PHP program
3. Then submit the received content to the database
4. Successful or failed to return to page
Sorry is the 24th line, just didn't mark the color.
If I do, it's all set to be hidden.
A. Show ()
A. Hide ()
Trigger function to switch to another button when one operation is completed
It is recommended that the LZ select the JQ selector is very powerful
With Ajax enough to do a lot of input submission work
You're going to use Ajax to submit the data.
<! DOCTYPE HTML PUBLIC "-//w3c//dtd HTML 4.01 transitional//en" "Http://www.w3.org/TR/html4/loose.dtd" >
The 24th line of the array can be changed to dynamic, or all the buttons are only the same data, how should be changed ah?
The code you just described is not very clear, you can refer to a test
xml/html Code
?
12345678910111213141516171819202122
Thank you, I didn't learn Ajax and JQ.
Items = Tds.join (', ');
That's a stubborn piece of paper.
function change (obj) { //can pass a current object over var tds = document.getElementsByTagName ("TD"); var T1 = document.getElementById ("a"). InnerHTML; var txt = document.createelement ("input"); Txt.type = "text"; txt.value = T1; Txt.id = "sort_t"; Obj.parentnode.childnodes[1].appendchild (TXT); Added to the second TD, can modify txt.select () as needed; }
When called,
Change (This)
And your ID name is duplicated, so you can only get the first one.