How to get content inside a div along with all html tags along with the values ​​present in the text box, etc.

how to get content inside a div along with all html tags along with the values ​​contained in the text field tags, etc. The jQuery function $('#divid').html()works in IE, but I get html in firefox, but the values ​​that are in the text area and text field are not set.

Thanks, Shriniket

+3
source share
2 answers

I would continue to do what you do to get the html and then use the jquery form plugin to get the field values. http://malsup.com/jquery/form/#api

var value = $('#divid').fieldValue();

, fieldSerialize(), , url.

+1

html, innerHTML div.

DOM div.

$("#divid").get(0);

DOM.

+2

Source: https://habr.com/ru/post/1725600/


All Articles