Get value of div content using jquery

后端 未结 5 1763
轮回少年
轮回少年 2020-11-28 11:09

I have the following html and I want to get the value of the div which is \"Other\" How can I do this with jQuery?

 
5条回答
  •  庸人自扰
    2020-11-28 11:46

    You can get div content using .text() in jquery

    var divContent = $('#field-function_purpose').text();
    console.log(divContent);
    

    Fiddle

提交回复
热议问题