You can understand what it means from the literal meaning of the code, but I don’t know how to get the line change information from it, so it doesn’t seem very practical. It’s OK to define a default value.
I just saw a way to use callbacks. You can also get the value of the column and pass it on, but you can only get one value. It is still not as good as the second method.
2. The second one is a little more troublesome, but more practical
"fnRowCallback":function(nRow,aData,iDataIndex){ var id = $('td', nRow).eq(0).text(); var ip = $( 'td', nRow).eq(3).text(); $('td:eq(-1)',nRow).html('Modify ' 'Delete'); return nRow; },
Call a callback method when initializing row data. You can easily obtain the row data and complete the submission function. However, there is a disadvantage. It requires background json transmission. An empty field is not flexible enough.
3. The third method is to combine the two methods, which can completely eliminate the need for background operations
"fnRowCallback":function(nRow,aData,iDataIndex){ var id = $('td', nRow).eq (0).text(); var ip = $('td', nRow).eq(3).text(); $('td:eq(-1)',nRow). html('Modify ' 'delete'); return nRow; },
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn