您要执行的操作称为 序列化 。
// This gives you an HTMLElement objectvar element = document.getElementById('TextBoxesGroup');// This gives you a string representing that element and its contentvar html = element.outerHTML; // This gives you a JSON object that you can send with jQuery.ajax's `data`// option, you can rename the property to whatever you want.var data = { html: html };// This gives you a string in JSON syntax of the object above that you can // send with XMLHttpRequest.var json = JSON.stringify(data);


