简体   繁体   中英

send HTML content in post request using javascript

I need to send a div element's inner HTML to server through post request.

What I tired using javascript is, Created a hidden input element and tried to assign the div's inner HTML in it and submitted it to the server. Since the inner HTML has single, double quotes it is not properly assigned to the value of input element.

Kindly suggest best solutions.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM