8 – How to retrieve HTML content with Ajax?

In a table form, I have submit buttons on each row in order to act on the row itself.
I’d like to do the action using Ajax commands as ReplaceCommand or AppendCommand.
Before that, I’d like to retrieve the HTML content of the part of the form I want to update in the Ajax callback.
How can I do that?