send html element in .post request

send html element in .post request

I'd like to send an html element as data in a .post() request, and I'm not sure how to do it. I've tried referencing the id, like this:

$.post('/save_state/', {output: '#main'}, null);

but that just sends the string '#main', where I want to send the element, #main.